|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.meta.xml.RendererProxy
public class RendererProxy
Provides access to a property renderer and the specific type that was used to look it up. Frequently, renderers attempting to render their children will need access to this information to better determine how to proceed... and in any case, the specific type should be the one passed to the renderer when the actual rendering is done and without keeping them together this would require a second lookup. This class is provided for renderers and shouldn't normally be used by external callers.
Constructor Summary | |
---|---|
RendererProxy(PropertyType type,
XmlPropertyRenderer renderer)
|
Method Summary | |
---|---|
boolean |
canRenderAsAttribute(java.lang.Object value)
Returns true if the specified value can be rendered as an attribute in this context. |
java.lang.String |
getAsAttribute(java.lang.Object value,
XmlRenderContext context)
Returns the string representation of the specified object as an attribute if supported. |
XmlPropertyRenderer |
getRenderer()
Returns the renderer for this proxy. |
PropertyType |
getType()
Returns the specific property type that was used to look up this proxy's renderer. |
void |
render(java.lang.Object value,
boolean forceWrap,
XmlRenderContext context,
boolean registerObject)
Renders the specified value using the internal renderer and type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RendererProxy(PropertyType type, XmlPropertyRenderer renderer)
Method Detail |
---|
public PropertyType getType()
public XmlPropertyRenderer getRenderer()
public boolean canRenderAsAttribute(java.lang.Object value)
public java.lang.String getAsAttribute(java.lang.Object value, XmlRenderContext context)
public void render(java.lang.Object value, boolean forceWrap, XmlRenderContext context, boolean registerObject)
value
- The object to render.forceWrap
- Set to true if the renderer should wrap the value in
its own style of start/end tags. False indicates that
the renderer can optionally leave them out. This is usually
used by renderers that support types that can be defined
as strings directly.context
- The rendering context for the write session.registerObject
- Set to true if the object should be added to the
registry and the appropriate xml.oid attribute emitted.
The object will only be registered if it is not already
in the registry.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |