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, isTablepublic 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()
MetaTypeisEnum in interface MetaTypeisEnum in class AbstractMetaTypepublic boolean isValue(Object obj)
isValue in interface MetaTypeisValue in class AbstractMetaTypeobj - the object to testCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.