public class TypeCheckingHandler extends BaseObjectHandler
Constructor and Description |
---|
TypeCheckingHandler() |
Modifier and Type | Method and Description |
---|---|
Binding |
createBinding(String name,
TemplateContext tc,
Code code)
Each call site has its own binding to allow for fine grained caching without
a separate parallel hierarchy of objects.
|
Writer |
falsey(Iteration iteration,
Writer writer,
Object object,
List<Object> scopes)
Call Iteration.next() either 0 (true) or 1 (fale) times.
|
Wrapper |
find(String name,
List<Object> scopes)
Find a value named "name" in the array of scopes in reverse order.
|
Writer |
iterate(Iteration iteration,
Writer writer,
Object object,
List<Object> scopes)
Iterate over an object by calling Iteration.next for each value.
|
String |
stringify(Object object)
Turns an object into the string representation that should be displayed
in templates.
|
checkField, checkMethod, coerce, findMember, getField, getMethod
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
makeList
public Wrapper find(String name, List<Object> scopes)
ObjectHandler
name
- the variable namescopes
- the ordered list of scopespublic Binding createBinding(String name, TemplateContext tc, Code code)
ObjectHandler
createBinding
in interface ObjectHandler
createBinding
in class BaseObjectHandler
name
- the name that we boundtc
- the textual context of the binding sitecode
- the code that was boundpublic Writer falsey(Iteration iteration, Writer writer, Object object, List<Object> scopes)
ObjectHandler
falsey
in interface ObjectHandler
falsey
in class BaseObjectHandler
iteration
- callback for the next iterationwriter
- the writer to write toobject
- the current objectscopes
- the scopes presentpublic Writer iterate(Iteration iteration, Writer writer, Object object, List<Object> scopes)
ObjectHandler
iterate
in interface ObjectHandler
iterate
in class BaseObjectHandler
iteration
- callback for the next iterationwriter
- the writer to write toobject
- the current objectscopes
- the scopes presentpublic String stringify(Object object)
ObjectHandler
stringify
in interface ObjectHandler
stringify
in class BaseObjectHandler
object
- the object to be displayedCopyright © 2018. All rights reserved.