Package freemarker.template.utility
Interface ObjectWrapperWithAPISupport
-
- All Superinterfaces:
ObjectWrapper
- All Known Subinterfaces:
RichObjectWrapper
- All Known Implementing Classes:
BeansWrapper
,DefaultObjectWrapper
,RhinoWrapper
,SimpleObjectWrapper
public interface ObjectWrapperWithAPISupport extends ObjectWrapper
Experimental - subject to change: Implemented byObjectWrapper
-s to helpTemplateModel
-s to implement thesomeValue?api
operation.Experimental status warning: This interface is subject to change on non-backward compatible ways, hence, it shouldn't be implemented outside FreeMarker yet.
- Since:
- 2.3.22
-
-
Field Summary
-
Fields inherited from interface freemarker.template.ObjectWrapper
BEANS_WRAPPER, DEFAULT_WRAPPER, SIMPLE_WRAPPER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TemplateHashModel
wrapAsAPI(Object obj)
Wraps an object to aTemplateModel
that exposes the object's "native" (usually, Java) API.-
Methods inherited from interface freemarker.template.ObjectWrapper
wrap
-
-
-
-
Method Detail
-
wrapAsAPI
TemplateHashModel wrapAsAPI(Object obj) throws TemplateModelException
Wraps an object to aTemplateModel
that exposes the object's "native" (usually, Java) API.- Parameters:
obj
- The object for which the API model has to be returned. Shouldn't benull
.- Returns:
- The
TemplateModel
through which the API of the object can be accessed. Can't benull
. - Throws:
TemplateModelException
- Since:
- 2.3.22
-
-