|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectde.grogra.reflect.MemberBase
de.grogra.reflect.TypeImpl
de.grogra.util.EnumerationType
public class EnumerationType
An EnumerationType is a type whose values are drawn
from an enumeration. The enumeration type is either integral
(consecutive int values beginning with 0) or a
reference type (a set of Object values).
| Field Summary | |
|---|---|
protected ObjectList |
descriptions
Contains the descriptions for the values of this enumeration type. |
static EnumerationType |
INT_ENUMERATION
An "abstract" base enumeration type which is used as supertype for those enumeration types which use ints
to encode their values. |
static EnumerationType |
OBJECT_ENUMERATION
An "abstract" base enumeration type which is used as supertype for those enumeration types which use Objects
to encode their values. |
protected ObjectList |
values
Contains the values of this enumeration type. |
| Fields inherited from class de.grogra.reflect.TypeImpl |
|---|
typeId |
| Fields inherited from class de.grogra.reflect.MemberBase |
|---|
annots, declaringType, descriptor, modifiers, name |
| Fields inherited from interface de.grogra.reflect.Type |
|---|
BOOLEAN, BYTE, CHAR, CLASS, DOUBLE, FLOAT, FLOATING_POINT, INT, INTEGRAL, INVALID, LOCAL_CLASS_MODIFIERS, LONG, MEMBER_CLASS_MODIFIERS, MEMBER_INTERFACE_MODIFIERS, NULL, NUMBER, NUMERIC, OBJECT, SHORT, STRING, TEXTAREA, TOP_LEVEL_CLASS_MODIFIERS, TOP_LEVEL_INTERFACE_MODIFIERS, TYPE, TYPE_0, VOID |
| Fields inherited from interface de.grogra.reflect.Member |
|---|
ABSTRACT, ACCESS_MODIFIERS, ARRAY, BRIDGE, CONSTANT, FINAL, INTERFACE, JAVA_MODIFIERS, LOCAL_CLASS, MIN_UNUSED_MODIFIER, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE |
| Constructor Summary | |
|---|---|
EnumerationType(java.lang.String name,
I18NBundle bundle,
int count)
Creates a new EnumerationType consisting of
count values of type int beginning with 0. |
|
EnumerationType(java.lang.String name,
I18NBundle bundle,
java.lang.String[] suffixes)
Creates a new EnumerationType consisting of
keys.length values of type int beginning
with 0. |
|
EnumerationType(java.lang.String name,
I18NBundle bundle,
java.lang.String[] suffixes,
java.lang.Object[] values,
Type implType)
|
|
EnumerationType(java.lang.String name,
java.lang.Object[] values,
EnumerationType superType,
Type implType)
Creates a new EnumerationType consisting of
values.length values, their type being
determined by supertype/code>. |
|
EnumerationType(java.lang.String name,
java.lang.String[] descriptions)
Creates a new EnumerationType consisting of
descriptions.length values of type int beginning
with 0. |
|
| Method Summary | |
|---|---|
void |
addListDataListener(javax.swing.event.ListDataListener l)
|
java.lang.Object |
getDescriptionFor(java.lang.Object value)
|
java.lang.Object |
getElementAt(int index)
|
java.lang.Class |
getImplementationClass()
|
int |
getSize()
|
java.lang.Object |
getValueFor(java.lang.Object description)
|
boolean |
isStringSerializable()
|
void |
removeListDataListener(javax.swing.event.ListDataListener l)
|
java.lang.Object |
valueOf(java.lang.String s)
|
| Methods inherited from class de.grogra.reflect.TypeImpl |
|---|
cloneObject, createArray, getArrayType, getBinaryName, getComponentType, getDeclaredField, getDeclaredFieldCount, getDeclaredInterface, getDeclaredInterfaceCount, getDeclaredMethod, getDeclaredMethodCount, getDeclaredType, getDeclaredTypeCount, getDefaultElementValue, getLookup, getPackage, getSimpleName, getSupertype, getTypeId, getTypeLoader, isInstance, newInstance, toString |
| Methods inherited from class de.grogra.reflect.MemberBase |
|---|
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getDescriptor, getModifiers, getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.grogra.reflect.Member |
|---|
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getDescriptor, getModifiers, getName |
| Field Detail |
|---|
protected ObjectList descriptions
public static final EnumerationType INT_ENUMERATION
ints
to encode their values.
public static final EnumerationType OBJECT_ENUMERATION
Objects
to encode their values.
protected ObjectList values
| Constructor Detail |
|---|
public EnumerationType(java.lang.String name,
I18NBundle bundle,
int count)
EnumerationType consisting of
count values of type int beginning with 0. The
representation of the values is obtained from the specified
resource bundle: The used key for value i
is name.i.
name - the base name for the keys and the name of the typebundle - the resource bundle to obtain representations for the valuescount - the number of values of this enumeration
public EnumerationType(java.lang.String name,
I18NBundle bundle,
java.lang.String[] suffixes)
EnumerationType consisting of
keys.length values of type int beginning
with 0. The representation of the values is obtained from the
specified resource bundle using the suffixes:
The keys for the bundle are the concatenations
name + '.' + suffixes[i].
name - a name for the typebundle - the resource bundle to obtain representations for the valuessuffixes - the suffixes to use for the resource bundle
public EnumerationType(java.lang.String name,
I18NBundle bundle,
java.lang.String[] suffixes,
java.lang.Object[] values,
Type implType)
public EnumerationType(java.lang.String name,
java.lang.Object[] values,
EnumerationType superType,
Type implType)
EnumerationType consisting of
values.length values, their type being
determined by supertype/code>.
- Parameters:
name - a name for the typevalues - the representation of the enumeration valuessuperType - the supertypeimplType - the class of the internal values
public EnumerationType(java.lang.String name,
java.lang.String[] descriptions)
EnumerationType consisting of
descriptions.length values of type int beginning
with 0. A string representation of the values is obtained from the
specified descriptions.
name - a name for the typedescriptions - strings to represent the values| Method Detail |
|---|
public void addListDataListener(javax.swing.event.ListDataListener l)
addListDataListener in interface javax.swing.ListModelpublic java.lang.Object getDescriptionFor(java.lang.Object value)
public java.lang.Object getElementAt(int index)
getElementAt in interface javax.swing.ListModelpublic java.lang.Class getImplementationClass()
getImplementationClass in interface TypegetImplementationClass in class TypeImplpublic int getSize()
getSize in interface javax.swing.ListModelpublic java.lang.Object getValueFor(java.lang.Object description)
public boolean isStringSerializable()
isStringSerializable in interface TypeisStringSerializable in class TypeImplpublic void removeListDataListener(javax.swing.event.ListDataListener l)
removeListDataListener in interface javax.swing.ListModelpublic java.lang.Object valueOf(java.lang.String s)
valueOf in interface TypevalueOf in class TypeImpl
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||