freemarker.ext.beans2
Interface ObjectWrapper

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
ArrayWrapper, BeanWrapper, CollectionWrapper, EnumerationWrapper, EnumWrapper, IterableWrapper, IteratorWrapper, ListIteratorWrapper, ListWrapper, MapWrapper, NumberWrapper, PropertiesWrapper, ResourceBundleWrapper

public interface ObjectWrapper
extends java.lang.Cloneable

An interface that allows an object to be wrapped. No matter what we're wrapping, the wrapper will provide this interface.

This interface allows object wrappers to be handled as prototypes. A prototype for the class of object will be created once, and all implementations of that class will be wrapped using a clone of the wrapper.

Since:
1.9
Version:
$Id: ObjectWrapper.java 1067 2011-06-06 10:55:28Z run2000 $
Author:
Nicholas Cull

Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object wrapper.
 void setObject(java.lang.Object object)
          Sets the object to be wrapped by this object wrapper.
 

Method Detail

setObject

void setObject(java.lang.Object object)
Sets the object to be wrapped by this object wrapper.

Parameters:
object - the object to be wrapped

clone

java.lang.Object clone()
Creates and returns a copy of this object wrapper. This allows the object wrapper to be used as a prototype.

Returns:
a clone of this instance