org.oddjob.arooa
Class PropertyProxyResolver

java.lang.Object
  extended byorg.oddjob.arooa.PropertyProxyResolver

public class PropertyProxyResolver
extends java.lang.Object

Provide a PropertyProxy Object which will be used to set a property with it's valueOf method. The proxy object is used during configuration to process the XML.

Author:
Rob Gordon.

Constructor Summary
PropertyProxyResolver()
           
PropertyProxyResolver(PropertyProxyResolver parent)
           
 
Method Summary
 void addFile(java.io.File file)
          Add definitions fom a property file.
 void addProperties(java.util.Properties props)
          Add class definitions from properties.
 void addResource(java.lang.String classDefFileName)
          Add definitions fom a resource property file, i.e.
 java.lang.Object proxyFor(java.lang.Object bean, java.lang.String property)
          Return a Proxy Type which is capable of resolving an XML definition into a Class of the given type.
 void setProxy(java.lang.String key, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyProxyResolver

public PropertyProxyResolver(PropertyProxyResolver parent)

PropertyProxyResolver

public PropertyProxyResolver()
Method Detail

addResource

public void addResource(java.lang.String classDefFileName)
Add definitions fom a resource property file, i.e. one that is on the class path.

Parameters:
classDefFileName - The file name.

addFile

public void addFile(java.io.File file)
Add definitions fom a property file.


addProperties

public void addProperties(java.util.Properties props)
Add class definitions from properties.

Parameters:
props - Class definition properties.

setProxy

public void setProxy(java.lang.String key,
                     java.lang.String value)

proxyFor

public java.lang.Object proxyFor(java.lang.Object bean,
                                 java.lang.String property)
Return a Proxy Type which is capable of resolving an XML definition into a Class of the given type. The XML could be elements, attributes or text so the Type should provide approprate add/set methods.

Parameters:
bean - The bean with the property.
Returns:
An object which can resolve the class or null if one doesn't exist.