public class EnumMetaType extends AbstractMetaType
ALLOWED_CLASSNAMES
Constructor and Description |
---|
EnumMetaType(Enum<?>[] validValues)
Create a new EnumMetaType from the Enum values.
|
EnumMetaType(String className,
List<String> validValues)
Create a new EnumMetaType.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<String> |
getValidValues()
Get the valid values
|
boolean |
isEnum()
Retrieve whether the class name of the type is an enum
|
protected static boolean |
isValid(Enum<?>[] values)
Are enums valid.
|
boolean |
isValue(Object obj)
Validate that obj is a SimpleValue.STRING or EnumValue whose string
value is in the set of valid enum strings.
|
String |
toString() |
getClassName, getDescription, getTypeName, isArray, isCollection, isComposite, isGeneric, isPrimitive, isProperties, isSimple, isTable
public EnumMetaType(String className, List<String> validValues)
className
- the class namevalidValues
- the valid valuespublic EnumMetaType(Enum<?>[] validValues)
validValues
- the valid Enum valuesprotected static boolean isValid(Enum<?>[] values)
values
- the enumspublic boolean isEnum()
MetaType
isEnum
in interface MetaType
isEnum
in class AbstractMetaType
public boolean isValue(Object obj)
isValue
in interface MetaType
isValue
in class AbstractMetaType
obj
- the object to testCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.