Package io.cui.tools.property
Enum PropertyMemberInfo
- java.lang.Object
-
- java.lang.Enum<PropertyMemberInfo>
-
- io.cui.tools.property.PropertyMemberInfo
-
- All Implemented Interfaces:
Serializable,Comparable<PropertyMemberInfo>
public enum PropertyMemberInfo extends Enum<PropertyMemberInfo>
Members of this enum define the way the corresponding property is subject to the contracts regarding the canonicalObjectmethods likeObject.equals(Object),Object.hashCode()andObject.toString()and theSerializablecontract- Author:
- Oliver Wolff
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULTDefines a default property contract, saying it is not transient and defines the Object-identity,Object.equals(Object),Object.hashCode()andObject.toString()NO_IDENTITYDefines a property that is not transient, and is not part of the object-identity and should therefore be ignored in the methodsObject.equals(Object),Object.hashCode()TRANSIENTDefines a transient property that is not part of the object-identity and should therefore be ignored in the methodsObject.equals(Object)and the serialization.UNDEFINEDThe actual state can not be defined.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PropertyMemberInforesolveForBean(Class<?> beanType, String propertyName)ResolvesPropertyMemberInfofor a given property withMoreReflection.static PropertyMemberInfovalueOf(String name)Returns the enum constant of this type with the specified name.static PropertyMemberInfo[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final PropertyMemberInfo DEFAULT
Defines a default property contract, saying it is not transient and defines the Object-identity,Object.equals(Object),Object.hashCode()andObject.toString()
-
NO_IDENTITY
public static final PropertyMemberInfo NO_IDENTITY
Defines a property that is not transient, and is not part of the object-identity and should therefore be ignored in the methodsObject.equals(Object),Object.hashCode()
-
TRANSIENT
public static final PropertyMemberInfo TRANSIENT
Defines a transient property that is not part of the object-identity and should therefore be ignored in the methodsObject.equals(Object)and the serialization.
-
UNDEFINED
public static final PropertyMemberInfo UNDEFINED
The actual state can not be defined.
-
-
Method Detail
-
values
public static PropertyMemberInfo[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PropertyMemberInfo c : PropertyMemberInfo.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PropertyMemberInfo valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
resolveForBean
public static PropertyMemberInfo resolveForBean(Class<?> beanType, String propertyName)
ResolvesPropertyMemberInfofor a given property withMoreReflection. This method can solely distinguish between the statesUNDEFINED,DEFAULTandTRANSIENT.NO_IDENTITYmust be defined from the caller if necessary;- Parameters:
beanType- to be checked, must not be nullpropertyName- to be checked, must not be null- Returns:
- the corresponding
PropertyReadWritefor a given property
-
-