|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.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 int s
to encode their values. |
static EnumerationType |
OBJECT_ENUMERATION
An "abstract" base enumeration type which is used as supertype for those enumeration types which use Object s
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, 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
int
s
to encode their values.
public static final EnumerationType OBJECT_ENUMERATION
Object
s
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 enumerationpublic 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 bundlepublic 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 valuesMethod Detail |
---|
public void addListDataListener(javax.swing.event.ListDataListener l)
addListDataListener
in interface javax.swing.ListModel
public java.lang.Object getDescriptionFor(java.lang.Object value)
public java.lang.Object getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
public java.lang.Class getImplementationClass()
getImplementationClass
in interface Type
getImplementationClass
in class TypeImpl
public int getSize()
getSize
in interface javax.swing.ListModel
public java.lang.Object getValueFor(java.lang.Object description)
public boolean isStringSerializable()
isStringSerializable
in interface Type
isStringSerializable
in class TypeImpl
public void removeListDataListener(javax.swing.event.ListDataListener l)
removeListDataListener
in interface javax.swing.ListModel
public java.lang.Object valueOf(java.lang.String s)
valueOf
in interface Type
valueOf
in class TypeImpl
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |