Package org.simpleframework.xml.core
Enum Class MethodType
- All Implemented Interfaces:
Serializable
,Comparable<MethodType>
,Constable
The
MethodType
enumeration is used to specify a
set of types that can be used to classify Java Beans methods.
This creates three types for the get, is, and set methods. The
method types allow the MethodScanner
to determine
what function the method has in creating a contact point for
the object. This also enables methods to be parsed correctly.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
This is the length of the prefix the method type uses. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
MethodType
(int prefix) Constructor for theMethodType
object. -
Method Summary
Modifier and TypeMethodDescriptionint
This is used to acquire the prefix for the method type.static MethodType
Returns the enum constant of this class with the specified name.static MethodType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GET
This is used to represent a method that acts as a getter. -
IS
This is used to represent a method that acts as a getter. -
SET
This is used to represent a method that acts as a setter. -
NONE
This is used to represent a a normal method to be ignored.
-
-
Field Details
-
prefix
private int prefixThis is the length of the prefix the method type uses.
-
-
Constructor Details
-
MethodType
private MethodType(int prefix) Constructor for theMethodType
object. This is used to create a method type specifying the length of the prefix. This allows the method name to be parsed easily.- Parameters:
prefix
- this is the length of the method name prefix
-
-
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
-
getPrefix
public int getPrefix()This is used to acquire the prefix for the method type. The prefix allows the method name to be extracted easily as it is used to determine the character range that forms the name.- Returns:
- this returns the method name prefix for the type
-