Package net.morimekta.providence.model
Enum ConstType._Field
- java.lang.Object
-
- java.lang.Enum<ConstType._Field>
-
- net.morimekta.providence.model.ConstType._Field
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ConstType._Field>
,net.morimekta.providence.descriptor.PField<ConstType>
- Enclosing class:
- ConstType
public static enum ConstType._Field extends java.lang.Enum<ConstType._Field> implements net.morimekta.providence.descriptor.PField<ConstType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANNOTATIONS
DOCUMENTATION
NAME
TYPE
VALUE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConstType._Field
fieldForId(int id)
static ConstType._Field
fieldForName(java.lang.String name)
static ConstType._Field
fieldForPojoName(java.lang.String name)
static ConstType._Field
findById(int id)
static ConstType._Field
findByName(java.lang.String name)
static ConstType._Field
findByPojoName(java.lang.String name)
net.morimekta.providence.descriptor.PStructDescriptor
getArgumentsType()
java.lang.Object
getDefaultValue()
net.morimekta.providence.descriptor.PDescriptor
getDescriptor()
int
getId()
java.lang.String
getName()
java.lang.String
getPojoName()
net.morimekta.providence.descriptor.PRequirement
getRequirement()
boolean
hasDefaultValue()
net.morimekta.providence.descriptor.PMessageDescriptor<ConstType>
onMessageType()
java.lang.String
toString()
static ConstType._Field
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ConstType._Field[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DOCUMENTATION
public static final ConstType._Field DOCUMENTATION
-
TYPE
public static final ConstType._Field TYPE
-
NAME
public static final ConstType._Field NAME
-
VALUE
public static final ConstType._Field VALUE
-
ANNOTATIONS
public static final ConstType._Field ANNOTATIONS
-
-
Method Detail
-
values
public static ConstType._Field[] 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 (ConstType._Field c : ConstType._Field.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConstType._Field valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getId
public int getId()
- Specified by:
getId
in interfacenet.morimekta.providence.descriptor.PField<ConstType>
-
getRequirement
@Nonnull public net.morimekta.providence.descriptor.PRequirement getRequirement()
- Specified by:
getRequirement
in interfacenet.morimekta.providence.descriptor.PField<ConstType>
-
getDescriptor
@Nonnull public net.morimekta.providence.descriptor.PDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfacenet.morimekta.providence.descriptor.PField<ConstType>
-
getArgumentsType
@Nullable public net.morimekta.providence.descriptor.PStructDescriptor getArgumentsType()
- Specified by:
getArgumentsType
in interfacenet.morimekta.providence.descriptor.PField<ConstType>
-
getName
@Nonnull public java.lang.String getName()
- Specified by:
getName
in interfacenet.morimekta.providence.descriptor.PField<ConstType>
-
getPojoName
@Nonnull public java.lang.String getPojoName()
- Specified by:
getPojoName
in interfacenet.morimekta.providence.descriptor.PField<ConstType>
-
hasDefaultValue
public boolean hasDefaultValue()
- Specified by:
hasDefaultValue
in interfacenet.morimekta.providence.descriptor.PField<ConstType>
-
getDefaultValue
@Nullable public java.lang.Object getDefaultValue()
- Specified by:
getDefaultValue
in interfacenet.morimekta.providence.descriptor.PField<ConstType>
-
onMessageType
@Nonnull public net.morimekta.providence.descriptor.PMessageDescriptor<ConstType> onMessageType()
- Specified by:
onMessageType
in interfacenet.morimekta.providence.descriptor.PField<ConstType>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<ConstType._Field>
-
findById
public static ConstType._Field findById(int id)
- Parameters:
id
- Field ID- Returns:
- The identified field or null
-
findByName
public static ConstType._Field findByName(java.lang.String name)
- Parameters:
name
- Field name- Returns:
- The named field or null
-
findByPojoName
public static ConstType._Field findByPojoName(java.lang.String name)
- Parameters:
name
- Field POJO name- Returns:
- The named field or null
-
fieldForId
public static ConstType._Field fieldForId(int id)
- Parameters:
id
- Field ID- Returns:
- The identified field
- Throws:
java.lang.IllegalArgumentException
- If no such field
-
fieldForName
public static ConstType._Field fieldForName(java.lang.String name)
- Parameters:
name
- Field name- Returns:
- The named field
- Throws:
java.lang.IllegalArgumentException
- If no such field
-
fieldForPojoName
public static ConstType._Field fieldForPojoName(java.lang.String name)
- Parameters:
name
- Field POJO name- Returns:
- The named field
- Throws:
java.lang.IllegalArgumentException
- If no such field
-
-