edu.vt.middleware.ldap.props
Class LdapConfigPropertyInvoker

java.lang.Object
  extended by edu.vt.middleware.ldap.props.AbstractPropertyInvoker
      extended by edu.vt.middleware.ldap.props.LdapConfigPropertyInvoker

public class LdapConfigPropertyInvoker
extends AbstractPropertyInvoker

PropertyInvoker stores setter methods for a class to make method invocation by property easier.

Version:
$Revision: 1498 $ $Date: 2010-08-18 10:21:37 -0400 (Wed, 18 Aug 2010) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class edu.vt.middleware.ldap.props.AbstractPropertyInvoker
clazz, logger, properties, PROPERTIES_CACHE
 
Constructor Summary
LdapConfigPropertyInvoker(Class<?> c, String propertiesDomain)
          Creates a new PropertyInvoker for the supplied class.
 
Method Summary
protected  Object convertValue(Class<?> type, String value)
          This converts the supplied string value into an Object of the appropriate supplied type.
protected  Object createArrayTypeFromPropertyValue(Class<?> c, String s)
          Returns the object which represents an array of the supplied class given the supplied string representation.
protected  Object createTypeFromPropertyValue(Class<?> c, String s)
          Returns the object which represents the supplied class given the supplied string representation.
 
Methods inherited from class edu.vt.middleware.ldap.props.AbstractPropertyInvoker
createClass, getProperties, hasProperty, initialize, instantiateType, invokeMethod, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapConfigPropertyInvoker

public LdapConfigPropertyInvoker(Class<?> c,
                                 String propertiesDomain)
Creates a new PropertyInvoker for the supplied class.

Parameters:
c - Class that has setter methods
propertiesDomain - String to prepend to each setter name
Method Detail

convertValue

protected Object convertValue(Class<?> type,
                              String value)
This converts the supplied string value into an Object of the appropriate supplied type. If value cannot be converted it is returned as is.

Specified by:
convertValue in class AbstractPropertyInvoker
Parameters:
type - of object to convert value into
value - to parse
Returns:
object of the supplied type

createTypeFromPropertyValue

protected Object createTypeFromPropertyValue(Class<?> c,
                                             String s)
Returns the object which represents the supplied class given the supplied string representation.

Parameters:
c - Class type to instantiate
s - String to parse
Returns:
Object of the supplied type or null

createArrayTypeFromPropertyValue

protected Object createArrayTypeFromPropertyValue(Class<?> c,
                                                  String s)
Returns the object which represents an array of the supplied class given the supplied string representation.

Parameters:
c - Class type to instantiate
s - String to parse
Returns:
Object that is an array or null


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.