|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.backendSupport.MinCodeUnit
public class MinCodeUnit
Minimum usable implementation of SIRCodeUnit interface.
Constructor Summary | |
---|---|
MinCodeUnit(JFieldDeclaration[] fields,
JMethodDeclaration[] methods)
Create a new MinCodeUnit. |
Method Summary | |
---|---|
void |
addField(JFieldDeclaration field)
Adds field to this, if field is not already registered as a field of this. |
void |
addFields(JFieldDeclaration[] fields)
Adds fields to the end fields of this. |
void |
addMethod(JMethodDeclaration method)
Add this method to the end of the methods array. |
void |
addMethods(JMethodDeclaration[] methods)
Adds methods to the methods of this if it not already in the methods container. |
JFieldDeclaration[] |
getFields()
Return the fields of this unit. |
JMethodDeclaration[] |
getMethods()
Return the methods of this unit. |
void |
setFields(JFieldDeclaration[] fields)
Set the fields of this to fields, overwriting the old array. |
void |
setMethods(JMethodDeclaration[] methods)
Install methods as the new methods array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MinCodeUnit(JFieldDeclaration[] fields, JMethodDeclaration[] methods)
fields
- Array of field declarations. May be empty if adding later.methods
- Array of method declarations. May be empty if adding later.Method Detail |
---|
public void addField(JFieldDeclaration field)
SIRCodeUnit
addField
in interface SIRCodeUnit
field
- The field to attempt to add.public void addFields(JFieldDeclaration[] fields)
SIRCodeUnit
addFields
in interface SIRCodeUnit
fields
- The fields to add to the end.public void addMethod(JMethodDeclaration method)
SIRCodeUnit
addMethod
in interface SIRCodeUnit
method
- The method to add.public void addMethods(JMethodDeclaration[] methods)
SIRCodeUnit
addMethods
in interface SIRCodeUnit
methods
- The methods to attempt to add to the end of the methods.public JFieldDeclaration[] getFields()
SIRCodeUnit
getFields
in interface SIRCodeUnit
public JMethodDeclaration[] getMethods()
SIRCodeUnit
getMethods
in interface SIRCodeUnit
public void setFields(JFieldDeclaration[] fields)
SIRCodeUnit
setFields
in interface SIRCodeUnit
fields
- The fields to install.public void setMethods(JMethodDeclaration[] methods)
SIRCodeUnit
setMethods
in interface SIRCodeUnit
methods
- The new methods to install.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |