|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.ide.ModelElement | +--org.objectweb.jac.ide.Type | +--org.objectweb.jac.ide.EnumeratedType
This class represents an enumerated type. Enumrated types allow to define a set of allowed values for an integer.
Constructor Summary | |
EnumeratedType()
|
Method Summary | |
void |
addName(String name)
|
String |
getGenerationFullName()
Gets full name to use for code generation. |
String |
getGenerationName()
Gets name to use for code generation. |
List |
getNames()
|
int |
getStartValue()
|
int |
getStep()
|
void |
importFromFile(File source)
Imports names from a file (one name per line) |
int |
nameToValue(String name)
Gets the value associated to a name. |
void |
removeName(String name)
|
void |
setStartValue(int startValue)
|
void |
setStep(int v)
|
String |
valueToName(int value)
Gets the name associated with a value. |
Methods inherited from class org.objectweb.jac.ide.Type |
getFullName, getPackagePath, isPrimitive, setPackagePath |
Methods inherited from class org.objectweb.jac.ide.ModelElement |
addConfigItem, addEndingLink, addLink, getConfigItems, getDescription, getEndingLinks, getLinks, getName, getType, remove, removeEndingLink, removeLink, setDescription, setEndingLinks, setLinks, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EnumeratedType()
Method Detail |
public String getGenerationName()
ModelElement
getGenerationName
in class ModelElement
public String getGenerationFullName()
ModelElement
getGenerationFullName
in class ModelElement
public void setStartValue(int startValue)
public int getStartValue()
public int getStep()
public void setStep(int v)
public void addName(String name)
public void removeName(String name)
public List getNames()
public void importFromFile(File source) throws IOException
source
- file to import from
IOException
public int nameToValue(String name) throws Exception
name
- the name
Exception
public String valueToName(int value) throws Exception
value
- the value
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |