|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.beans.FeatureDescriptor
java.beans.PropertyDescriptor
org.progeeks.util.beans.ContainerPropertyDescriptor
public class ContainerPropertyDescriptor
Subclass of the java.beans.PropertyDescriptor class that provides additional information about multi-valued properties.
Nested Class Summary | |
---|---|
protected static class |
ContainerPropertyDescriptor.PluralPattern
Encapsulates the conversion from a specific plural type to a specific singular type using a regex expression and a suffix. |
Constructor Summary | |
---|---|
ContainerPropertyDescriptor(java.lang.Class beanClass,
java.beans.PropertyDescriptor desc)
|
Method Summary | |
---|---|
java.lang.reflect.Method |
getAddMethod()
Returns the method that should be used when adding values. |
java.lang.Class |
getElementClass()
Uses simple heuristics to attempt to introspect the lists element type. |
java.lang.reflect.Method |
getInsertMethod()
Returns the method that should be used when inserting values. |
java.lang.reflect.Method |
getRemoveIndexedMethod()
Returns the method that should be used when removing values by index. |
java.lang.reflect.Method |
getRemoveMethod()
Returns the method that should be used when removing values. |
java.lang.reflect.Method |
getReplaceIndexMethod()
Returns the method that should be used when replacing values by index. |
java.lang.String |
getSingularPropertyName()
Returns the singular version of the property name that was used during element type detection, or null if detection bypassed this step. |
boolean |
isArray()
Returns true if this property value is actually an array. |
static boolean |
isContainerType(java.lang.Class type)
Returns true if the specified class represents a type that can be handled as a ListPropertyType. |
boolean |
isList()
Returns true if this property value is a list-based implementation. |
static boolean |
isListType(java.lang.Class type)
Returns true if the specified class represents a type that can be handled as a ListPropertyType. |
boolean |
isMutable()
Returns true if the elements can be replaced. |
boolean |
isResizable()
Returns true if the property supports resizing such as with add or remove. |
protected boolean |
isSingularForm(java.lang.String plural,
java.lang.String name)
Returns true if the specified name is a possible singular form of the plural property name. |
protected void |
setupContainerInfo()
Attempts to configure the container info values based on some introspection heuristics and guesswork. |
Methods inherited from class java.beans.PropertyDescriptor |
---|
createPropertyEditor, equals, getPropertyEditorClass, getPropertyType, getReadMethod, getWriteMethod, hashCode, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethod |
Methods inherited from class java.beans.FeatureDescriptor |
---|
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContainerPropertyDescriptor(java.lang.Class beanClass, java.beans.PropertyDescriptor desc) throws java.beans.IntrospectionException
java.beans.IntrospectionException
Method Detail |
---|
public static boolean isContainerType(java.lang.Class type)
public static boolean isListType(java.lang.Class type)
public boolean isList()
public boolean isArray()
public boolean isResizable()
public boolean isMutable()
public java.lang.reflect.Method getAddMethod()
public java.lang.reflect.Method getInsertMethod()
public java.lang.reflect.Method getReplaceIndexMethod()
public java.lang.reflect.Method getRemoveMethod()
public java.lang.reflect.Method getRemoveIndexedMethod()
public java.lang.String getSingularPropertyName()
public java.lang.Class getElementClass()
protected boolean isSingularForm(java.lang.String plural, java.lang.String name)
protected void setupContainerInfo()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |