|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.mjc.CFieldTable
This class encapsulates the fields of a class.
| Field Summary | |
private boolean |
expandable
Indicates whether additional fields can be added to this field table. |
private Hashtable |
hashed
|
private static int |
uniquifier
|
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
CFieldTable(CField[] array,
Hashtable hashed)
Constructs a field table using one of array or hashed. |
|
| Method Summary | |
void |
add(CSourceField field)
Adds a field. |
FieldInfo[] |
buildFieldInfo()
Returns the field infos |
private Hashtable |
buildHash(CField[] array)
Utility methods builds a hash table from the array of fields. |
Collection |
fields()
Returns a Collection of CField objects contained in this CFieldTable. |
CField |
lookup(String ident)
Returns the field with specified name |
int |
size()
Returns the number of fields. |
CSourceField[] |
sourceFields()
Returns an array of the CSourceFields stored in this field table. |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Hashtable hashed
private boolean expandable
private static int uniquifier
| Constructor Detail |
public CFieldTable(CField[] array,
Hashtable hashed)
| Method Detail |
private Hashtable buildHash(CField[] array)
requires array != null && (\forall int i; 0<=i && i < array.length; array[i] instanceof CSourceField ); assignable expandable; ensures expandable; also requires array != null && (\exists int i; 0<=i && i < array.length; !(array[i] instanceof CSourceField) ); ensures !expandable;
public CField lookup(String ident)
ident - the simple name of the fieldpublic int size()
public Collection fields()
public void add(CSourceField field)
public FieldInfo[] buildFieldInfo()
public CSourceField[] sourceFields()
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||