- All Implemented Interfaces:
Serializable,Comparable<PropertyReadWrite>,Constable
Defines the read write permissions for a given property. It is defined for
properties java Bean properties.
- Author:
- Oliver Wolff
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe property can neither be read nor written to.The corresponding property is read only.The property can be read and written to.The property can only be written to. -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyReadWritefromPropertyDescriptor(PropertyDescriptor descriptor, Class<?> beanType, String propertyName) ResolvesPropertyReadWriteform the givenPropertyDescriptor.static PropertyReadWriteresolveForBean(Class<?> beanType, String propertyName) ResolvesPropertyReadWritefor a given property withMoreReflectionstatic PropertyReadWriteReturns the enum constant of this class with the specified name.static PropertyReadWrite[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READ_ONLY
The corresponding property is read only. -
READ_WRITE
The property can be read and written to. -
WRITE_ONLY
The property can only be written to. -
NONE
The property can neither be read nor written to.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
resolveForBean
ResolvesPropertyReadWritefor a given property withMoreReflection- Parameters:
beanType- to be checked, must not be nullpropertyName- to be checked, must not be null- Returns:
- the corresponding
PropertyReadWritefor a given property
-
fromPropertyDescriptor
public static PropertyReadWrite fromPropertyDescriptor(PropertyDescriptor descriptor, Class<?> beanType, String propertyName) ResolvesPropertyReadWriteform the givenPropertyDescriptor. If this provides unclear result it will callresolveForBean(Class, String)- Parameters:
descriptor- to be read frombeanType- to be checked, must not be nullpropertyName- to be checked, must not be null- Returns:
- the corresponding
PropertyReadWritefor a given property
-