public abstract class BaseObjectHandler extends Object implements ObjectHandler
| Constructor and Description |
|---|
BaseObjectHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkField(Field member) |
protected void |
checkMethod(Method member) |
Object |
coerce(Object object)
Coerce results to Java native iterables, functions, callables.
|
abstract 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,
Object[] scopes)
Call Iteration.next() either 0 (true) or 1 (fale) times.
|
protected AccessibleObject |
findMember(Class sClass,
String name) |
protected Field |
getField(Class aClass,
String name) |
protected Method |
getMethod(Class aClass,
String name,
Class... params) |
Writer |
iterate(Iteration iteration,
Writer writer,
Object object,
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindpublic Object coerce(Object object)
ObjectHandlercoerce in interface ObjectHandlerpublic Writer falsey(Iteration iteration, Writer writer, Object object, Object[] scopes)
ObjectHandlerfalsey in interface ObjectHandlerpublic abstract Binding createBinding(String name, TemplateContext tc, Code code)
ObjectHandlercreateBinding in interface ObjectHandlerpublic Writer iterate(Iteration iteration, Writer writer, Object object, Object[] scopes)
ObjectHandleriterate in interface ObjectHandlerprotected Field getField(Class aClass, String name) throws NoSuchFieldException
NoSuchFieldExceptionprotected Method getMethod(Class aClass, String name, Class... params) throws NoSuchMethodException
NoSuchMethodExceptionprotected AccessibleObject findMember(Class sClass, String name)
protected void checkMethod(Method member) throws NoSuchMethodException
NoSuchMethodExceptionprotected void checkField(Field member) throws NoSuchFieldException
NoSuchFieldExceptionpublic String stringify(Object object)
ObjectHandlerstringify in interface ObjectHandlerobject - the object to be displayedCopyright © 2014. All Rights Reserved.