Enum Class AccessorType
- All Implemented Interfaces:
Serializable,Comparable<AccessorType>,Constable
The type of accessor.
- Since:
- 0.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA field getter, accessor must accept no args and return field typeA field setter, accessor must accept single arg of the field type and return voidAn invoker (proxy) methodAn invoker (proxy) method -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessorTypeget(boolean isInvoker, org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.IMethodBinding binding, org.cadixdev.bombe.type.signature.MethodSignature signature, AccessorData data) Gets the accessor type for the given accessor (or invoker).String[]Gets all of the expected prefixes for this accessor type.booleanisExpectedPrefix(String prefix) Checks if the given prefix is a expected for this accessor type.static AccessorTypeReturns the enum constant of this class with the specified name.static AccessorType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIELD_GETTER
A field getter, accessor must accept no args and return field type -
FIELD_SETTER
A field setter, accessor must accept single arg of the field type and return void -
METHOD_PROXY
An invoker (proxy) method -
OBJECT_FACTORY
An invoker (proxy) method
-
-
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
-
getPrefixes
Gets all of the expected prefixes for this accessor type.- Returns:
- The expected prefixes
-
isExpectedPrefix
Checks if the given prefix is a expected for this accessor type.- Parameters:
prefix- The prefix to check- Returns:
trueif the prefix is expected for this type
-
get
public static AccessorType get(boolean isInvoker, org.cadixdev.mercury.shadow.org.eclipse.jdt.core.dom.IMethodBinding binding, org.cadixdev.bombe.type.signature.MethodSignature signature, AccessorData data) Gets the accessor type for the given accessor (or invoker).- Parameters:
isInvoker- Whether the accessor is a invokerbinding- The accessor method bindingsignature- The accessor method signature (name and descriptor)data- The accessor data- Returns:
- The type of the accessor
-