ObjectWrapperWithAPISupport (FreeMarker 2.3.23 API)
Date: 2015-07-05

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 by `ObjectWrapper`-s to help `TemplateModel`-s to implement the `someValue?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 and Description
    --- | ---
    `TemplateHashModel` | `wrapAsAPI(Object obj)` Wraps an object to a `TemplateModel` 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 a `TemplateModel` that exposes the object's "native" (usually, Java) API.
      Parameters:
        `obj` - The object for which the API model has to be returned. Shouldn't be `null`.
      Returns:
        The `TemplateModel` through which the API of the object can be accessed. Can't be `null`.
      Throws:
        `TemplateModelException`
      Since:
        2.3.22