intarsys runtime library

de.intarsys.tools.dom
Class ElementObjectProxy

java.lang.Object
  extended by de.intarsys.tools.dom.ElementObjectProxy
All Implemented Interfaces:
IElementConfigurable, IProxy

public class ElementObjectProxy
extends Object
implements IElementConfigurable, IProxy

A generic implementation to ease implementation of "deferred" objects declared via an Element.

This object encapsulates the Element, preparing for realization of the intended object on demand. Two common scenarios are supported. In the first, the provider of the extension point itself creates the ElementObjectProxy directly to avoid the cost of reflective class access. In the second, a concrete factory object may be derived from ElementObjectProxy to inherit its lazyness with regard to hosting an object to be realized. The concrete proxy class name may be declared in an another element attribute than "class".


Constructor Summary
ElementObjectProxy()
           
ElementObjectProxy(Class pProxyClass, Element pElement, ClassLoader pClassLoader)
           
ElementObjectProxy(Class pProxyClass, Element pElement, String classAttribute, ClassLoader pClassLoader)
           
 
Method Summary
 void configure(Element pElement)
           
 ClassLoader getClassLoader()
           
 Element getElement()
           
 Class getProxyClass()
           
 String getProxyClassAttribute()
           
 Object getRealized()
          The object represented by the receiver.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementObjectProxy

public ElementObjectProxy()

ElementObjectProxy

public ElementObjectProxy(Class pProxyClass,
                          Element pElement,
                          ClassLoader pClassLoader)

ElementObjectProxy

public ElementObjectProxy(Class pProxyClass,
                          Element pElement,
                          String classAttribute,
                          ClassLoader pClassLoader)
Method Detail

configure

public void configure(Element pElement)
Specified by:
configure in interface IElementConfigurable

getClassLoader

public ClassLoader getClassLoader()

getElement

public Element getElement()

getProxyClass

public Class getProxyClass()

getProxyClassAttribute

public String getProxyClassAttribute()

getRealized

public Object getRealized()
Description copied from interface: IProxy
The object represented by the receiver.

Specified by:
getRealized in interface IProxy
Returns:
The object represented by the receiver.

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.