at.dms.kjc.sir
Interface SIRCodeUnit

All Known Implementing Classes:
CellComputeCodeStore, CodeStoreHelper, CodeStoreHelperJoiner, CodeStoreHelperSimple, CodeStoreHelperSplitter, ComputeCodeStore, File_Writer, FileInputContent, FileOutputContent, FileReader, FilterContent, InputContent, MinCodeUnit, OutputContent, PredefinedContent, RawComputeCodeStore, SIRContainer, SIRDummySink, SIRDummySource, SIRFeedbackLoop, SIRFileReader, SIRFileWriter, SIRFilter, SIRGlobal, SIRHelper, SIRIdentity, SIRPhasedFilter, SIRPipeline, SIRPredefinedFilter, SIRRecursiveStub, SIRSplitJoin, SIRStream, SIRStructure, SIRTwoStageFilter, UniComputeCodeStore

public interface SIRCodeUnit

Interface of accessors for classes that define methods and field variables. It is useful for optimization and code transformation passes operate on the IR of multiple backends.

Author:
mgordon

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.
 

Method Detail

getMethods

JMethodDeclaration[] getMethods()
Return the methods of this unit.

Returns:
the methods of this unit.

addMethod

void addMethod(JMethodDeclaration method)
Add this method to the end of the methods array. Do not check for duplication.

Parameters:
method - The method to add.

addMethods

void addMethods(JMethodDeclaration[] methods)
Adds methods to the methods of this if it not already in the methods container.

Parameters:
methods - The methods to attempt to add to the end of the methods.

setMethods

void setMethods(JMethodDeclaration[] methods)
Install methods as the new methods array. Disregarding the old methods array.

Parameters:
methods - The new methods to install.

getFields

JFieldDeclaration[] getFields()
Return the fields of this unit.

Returns:
the fields of this unit.

addField

void addField(JFieldDeclaration field)
Adds field to this, if field is not already registered as a field of this.

Parameters:
field - The field to attempt to add.

addFields

void addFields(JFieldDeclaration[] fields)
Adds fields to the end fields of this. Does not check for duplicates.

Parameters:
fields - The fields to add to the end.

setFields

void setFields(JFieldDeclaration[] fields)
Set the fields of this to fields, overwriting the old array.

Parameters:
fields - The fields to install.