public class WrapDynaClass extends Object implements org.apache.commons.beanutils.DynaClass, Serializable
Implementation of DynaClass for DynaBeans that wrap
standard JavaBean instances.
Based on the BeanUtils version but Serializable, and also supports mapped types.
| Modifier and Type | Method and Description |
|---|---|
static void |
clear()
Clear our cache of WrapDynaClass instances.
|
static WrapDynaClass |
createDynaClass(Class<?> beanClass)
Create (if necessary) and return a new
WrapDynaClass
instance for the specified bean class. |
org.apache.commons.beanutils.DynaProperty[] |
getDynaProperties()
Return an array of
ProperyDescriptors for the properties
currently defined in this DynaClass. |
org.apache.commons.beanutils.DynaProperty |
getDynaProperty(String name)
Return a property descriptor for the specified property, if it exists;
otherwise, return
null. |
String |
getName()
Return the name of this DynaClass (analogous to the
getName() method of java.lang.ClassDynaClass implementation class to support
different dynamic classes, with different sets of properties. |
protected void |
introspect(Class<?> beanClass)
Introspect our bean class to identify the supported properties.
|
boolean |
isReadable(String propertyName) |
boolean |
isWritable(String propertyName) |
org.apache.commons.beanutils.DynaBean |
newInstance()
Unsupported.
|
public String getName()
getName() method of java.lang.ClassDynaClass implementation class to support
different dynamic classes, with different sets of properties.getName in interface org.apache.commons.beanutils.DynaClasspublic org.apache.commons.beanutils.DynaProperty getDynaProperty(String name)
null.getDynaProperty in interface org.apache.commons.beanutils.DynaClassname - Name of the dynamic property for which a descriptor
is requestedIllegalArgumentException - if no property name is specifiedpublic org.apache.commons.beanutils.DynaProperty[] getDynaProperties()
Return an array of ProperyDescriptors for the properties
currently defined in this DynaClass. If no properties are defined, a
zero-length array will be returned.
FIXME - Should we really be implementing
getBeanInfo() instead, which returns property descriptors
and a bunch of other stuff?
getDynaProperties in interface org.apache.commons.beanutils.DynaClasspublic org.apache.commons.beanutils.DynaBean newInstance()
throws UnsupportedOperationException
newInstance in interface org.apache.commons.beanutils.DynaClassUnsupportedOperationException - Always.public boolean isReadable(String propertyName)
public boolean isWritable(String propertyName)
public static void clear()
public static WrapDynaClass createDynaClass(Class<?> beanClass)
WrapDynaClass
instance for the specified bean class.beanClass - Bean class for which a WrapDynaClass is requestedprotected void introspect(Class<?> beanClass)