|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.metatype.api.types.AbstractMetaType
org.jboss.metatype.api.types.EnumMetaType
public class EnumMetaType
EnumMetaType.
| Field Summary |
|---|
| Fields inherited from interface org.jboss.metatype.api.types.MetaType |
|---|
ALLOWED_CLASSNAMES |
| Constructor Summary | |
|---|---|
EnumMetaType(Enum<?>[] validValues)
Create a new EnumMetaType from the Enum values. |
|
EnumMetaType(String className,
List<String> validValues)
Create a new EnumMetaType. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.jboss.metatype.api.types.AbstractMetaType |
|---|
getClassName, getDescription, getTypeName, isArray, isCollection, isComposite, isGeneric, isPrimitive, isProperties, isSimple, isTable |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EnumMetaType(String className,
List<String> validValues)
className - the class namevalidValues - the valid valuespublic EnumMetaType(Enum<?>[] validValues)
validValues - the valid Enum values| Method Detail |
|---|
protected static boolean isValid(Enum<?>[] values)
values - the enums
public List<String> getValidValues()
public boolean isEnum()
MetaType
isEnum in interface MetaTypeisEnum in class AbstractMetaTypepublic boolean isValue(Object obj)
isValue in interface MetaTypeisValue in class AbstractMetaTypeobj - the object to test
public boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||