|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSFE.Compiler.Type
SFE.Compiler.ParentType
SFE.Compiler.StructType
public class StructType
Class StructType is used for representing a Struct that was defined in the program. An object of StructType contains a vector containing the field that were defined a the data member of this StructType.
Constructor Summary | |
---|---|
StructType()
Constructs a new empty StructType object. |
Method Summary | |
---|---|
void |
addField(java.lang.String fieldName,
Type type)
Adds a new field as a data member to this StructType. |
Type |
fromFieldName(java.lang.String fieldName)
Return the object representing the type of the specified field name, or null if there was no such field defined for this StructType. |
java.util.Vector |
getDerivedLvalues(Lvalue base)
Returns a vector of all the derived lvalue (inluding this lvalue). |
java.util.Vector |
getFields()
Returns a Set with all this struct's field names. |
java.lang.String |
getNameAt(java.lang.String baseName,
int i)
Returns the name of the bit at offset i in the struct. |
int |
size()
Returns the length of the this Struct type in bits. |
java.lang.String |
toFormat()
DAMMY Returns a String representing this object as it should appear in the format file. |
java.lang.String |
toFormat(java.lang.String parentName,
Function function)
Returns a String representing this object as it should appear in the format file. |
java.lang.String |
toString()
Returns a string representation of the this struct type. |
Methods inherited from class SFE.Compiler.ParentType |
---|
hasDerives |
Methods inherited from class SFE.Compiler.Type |
---|
defineName, fromName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StructType()
Method Detail |
---|
public int size()
size
in class Type
public void addField(java.lang.String fieldName, Type type)
fieldName
- the name of the new field.type
- the type of the new field.public java.lang.String toString()
toString
in class java.lang.Object
public Type fromFieldName(java.lang.String fieldName)
fieldName
- the field name whose associated type is to be returned.
public java.lang.String toFormat(java.lang.String parentName, Function function)
public java.util.Vector getFields()
public java.lang.String toFormat()
toFormat
in class Type
public java.lang.String getNameAt(java.lang.String baseName, int i)
getNameAt
in class ParentType
baseName
- the name of a childi
- the offset in bits of this object.
public java.util.Vector getDerivedLvalues(Lvalue base)
getDerivedLvalues
in class ParentType
base
- the lavalue that call the this method (base.type == this)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |