Package org.apache.commons.jxpath
Interface JXPathBeanInfo
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
JXPathBasicBeanInfo
JXPathBeanInfo is similar to
BeanInfo in that it describes properties of a JavaBean class. By default, JXPathBeanInfo classes are
automatically generated by JXPathIntrospector based on the java.beans.BeanInfo. As with JavaBeans, the user can supply an
alternative implementation of JXPathBeanInfo for a custom class. The alternative implementation is located by class name, which is the same as the name of
the class it represents with the suffix "XBeanInfo". So, for example, if you need to provide an alternative JXPathBeanInfo class for class "com.foo.Bar",
write a class "com.foo.BarXBeanInfo" and make it implement the JXPathBeanInfo interface.-
Method Summary
Modifier and TypeMethodDescriptionGets the class implementing theDynamicPropertyHandlerinterface for dynamic objects.getPropertyDescriptor(String propertyName) Gets a PropertyDescriptor for the specified name or null if there is no such property.Gets a list of property descriptors for the beans described by this bean info object.booleanisAtomic()Tests whether objects of this class are treated as atomic objects which have no properties of their own.booleanTests whether the objects of this class have dynamic properties (e.g. java.util.Map).
-
Method Details
-
getDynamicPropertyHandlerClass
Gets the class implementing theDynamicPropertyHandlerinterface for dynamic objects. That class can be used to access dynamic properties.- Returns:
- Class The class implementing the
DynamicPropertyHandlerinterface.
-
getPropertyDescriptor
Gets a PropertyDescriptor for the specified name or null if there is no such property.- Parameters:
propertyName- property name- Returns:
- PropertyDescriptor
-
getPropertyDescriptors
Gets a list of property descriptors for the beans described by this bean info object. Returns null for atomic beans.- Returns:
- PropertyDescriptor[]
-
isAtomic
boolean isAtomic()Tests whether objects of this class are treated as atomic objects which have no properties of their own. For example,StringandNumberare atomic.- Returns:
- Tests whether objects of this class are treated as atomic objects.
-
isDynamic
boolean isDynamic()Tests whether the objects of this class have dynamic properties (e.g. java.util.Map). If this method returns true,getPropertyDescriptors()should return null andgetDynamicPropertyHandlerClass()should return a valid class name. An object cannot have both static and dynamic properties at the same time.- Returns:
- whether the objects of this class have dynamic properties.
-