public class IlEnumInfo extends Object
IlEnumInfo
describes a subclass of IlEnum
.IlEnum
Constructor and Description |
---|
IlEnumInfo(Class clazz)
Creates the metainformation for an enum.
|
IlEnumInfo(Class clazz,
boolean initFields)
Creates the metainformation for an enum.
|
IlEnumInfo(Class clazz,
boolean initFields,
boolean forceOwnTable)
Creates the metainformation for an enum.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(IlEnum item)
Adds an element to this enum.
|
static Enumeration |
AllEnumInfos()
Returns an enumeration of all existing enum classes.
|
Enumeration |
elements()
Returns an enumeration of all existing items.
|
static IlEnumInfo |
FromClass(Class clazz)
Returns the class information for an
IlEnum class, given its class. |
IlEnum |
get(String name)
Returns the item with a given name, or
null if none exists. |
Class |
getDefiningClass()
Returns the enum, a subclass of
IlEnum . |
boolean |
has(String name)
Determines whether an enum has an item with a given name.
|
void |
removeElement(IlEnum item)
Removes an element from this enum.
|
int |
size()
Returns the number of items in the element table.
|
String |
toString()
Returns the String representation of this IlEnumInfo's values.
|
public IlEnumInfo(Class clazz, boolean initFields, boolean forceOwnTable)
initFields
- if true, public static fields of the correct type
and without value will be assigned a valueforceOwnTable
- if true, this class will not share its table with
its superclasspublic IlEnumInfo(Class clazz, boolean initFields)
initFields
- if true, public static fields of the correct type
and without value will be assigned a valuepublic IlEnumInfo(Class clazz)
IlEnum
subclass as first argument.
By convention, this metainformation is stored in a static class variable
called metainfo
.public Class getDefiningClass()
IlEnum
.public static Enumeration AllEnumInfos()
IlEnumInfo
public static IlEnumInfo FromClass(Class clazz)
IlEnum
class, given its class.public Enumeration elements()
IlEnum
public boolean has(String name)
public int size()
public void addElement(IlEnum item)
public void removeElement(IlEnum item)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.