|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Function: The Code Assembler Interface. The CodeGenerators get a reference to a CodeAssembler implementation of this Interface. The function of a CodeAssemblerPuts together the code build from the various existing code generators into a PolicyEntry object and communicates with the Coordinator (policy service) to store the entry in the directory service. The CodeAssembler acts as a coordinator for code generation and provides access to message reporting for code generators Code Generators can choose to bypass the default storing mechanism provided by the CodeAssembler
| Method Summary | |
void |
addCodeGenerator(CodeGeneratorI newCodeGenerator,
int codeGenType)
Add a new CodeGenerator |
void |
buildMessage(java.lang.String message)
Ask to display a build-message |
void |
createCompPolInst(java.lang.String domain,
java.lang.String name,
int type,
SubjectTargetI subjectDomain,
java.lang.String sourceText)
Create an Instance Entry in the Directory for a Composite Policy |
void |
createCompPolType(java.lang.String domain,
java.lang.String name,
int type,
InstantiationsListI instList,
TypesListI baseTypes,
java.lang.String sourceText)
Create a CompositePolicyType to the Entry of a composite policy |
void |
errorMessage(java.lang.String message)
Ask to display an error-message |
void |
generateCode(PolicyListIteratorI codeIterator)
It starts the code generation. |
ponderToolkit.compiler.syntax.node.Start |
getAST()
Return a reference to the AST of the compiled code. |
java.util.Hashtable |
getCodeGenerators()
Retutrns the code Generators that are going to be used to generate code. |
boolean |
getCodeStoreEnabled()
Get the codeStore status of the compiler. |
java.lang.String |
getDestinationDirectory()
Get the destination directory for the code generator. |
java.lang.String |
getFilename()
Get the input file name |
boolean |
getOfflineCompile()
Get the offline mode of the compiler. |
void |
infoMessage(java.lang.String message)
Ask to display an info-message |
void |
instantiateCompPol(InstantiationObjectI instObj,
SubjectTargetI subjectDomain,
java.lang.String sourceText)
Create an instance-entry for a composite policy, and copy the sub-entries of the type-entry (from which this is to be instatiated) to the instance-entry |
void |
setAlternateCode(java.lang.Object code,
BasicPolicyICode policyObject,
int type)
Called by a CodeGenerator to set the generated code for the policyObject. |
void |
setAlternateCode(java.lang.Object code,
InstantiationObjectI policyObject,
int type)
Called by a CodeGenerator to set the generated code for a policyObject instantiated from a Type. |
void |
setCodeGenerators(java.util.Hashtable newCodeGenerators)
Set the code Generators that are going to be used to generate code. |
void |
setCodeText(java.lang.String text,
int codeType)
Displays the given code text in the default code-output stream |
void |
setJavaCode(byte[] classBytes,
BasicPolicyICode policyObject)
Called by a Java CodeGenerator to set the generated code for the policyObject. |
void |
setJavaCode(byte[] classBytes,
java.lang.Object[] actualParams,
InstantiationObjectI policyObject)
Called by a Java CodeGenerator to set the generated code for the policyObject instantiated from a policy Type. |
void |
warningMessage(java.lang.String message)
Ask to display a warning-message |
| Method Detail |
public void addCodeGenerator(CodeGeneratorI newCodeGenerator,
int codeGenType)
public void setCodeGenerators(java.util.Hashtable newCodeGenerators)
public java.util.Hashtable getCodeGenerators()
public boolean getOfflineCompile()
public boolean getCodeStoreEnabled()
public ponderToolkit.compiler.syntax.node.Start getAST()
public java.lang.String getDestinationDirectory()
public java.lang.String getFilename()
public void generateCode(PolicyListIteratorI codeIterator)
public void setJavaCode(byte[] classBytes,
BasicPolicyICode policyObject)
public void setJavaCode(byte[] classBytes,
java.lang.Object[] actualParams,
InstantiationObjectI policyObject)
public void setAlternateCode(java.lang.Object code,
BasicPolicyICode policyObject,
int type)
public void setAlternateCode(java.lang.Object code,
InstantiationObjectI policyObject,
int type)
public void setCodeText(java.lang.String text,
int codeType)
public void createCompPolInst(java.lang.String domain,
java.lang.String name,
int type,
SubjectTargetI subjectDomain,
java.lang.String sourceText)
throws java.lang.Exception
domain - The domain in which to create the entryname - The name of the entry to createtype - The type of the entry to create
(from ponderCompiler.codeGen.interfaces.CompositePolicyI)subjectDomain - The Subject Domain if it is role. If not, this
is nullsourceText - The source text of the composite policy
public void createCompPolType(java.lang.String domain,
java.lang.String name,
int type,
InstantiationsListI instList,
TypesListI baseTypes,
java.lang.String sourceText)
throws java.lang.Exception
domain - The domain in which to create the entryname - The name of the entry to createtype - The type of the entry to create
(from ponderCompiler.codeGen.interfaces.CompositePolicyI)instList - The list of InstantiationObject sbaseTypes - The list of baseType namessourceText - The source text of the composite policy
public void instantiateCompPol(InstantiationObjectI instObj,
SubjectTargetI subjectDomain,
java.lang.String sourceText)
throws java.lang.Exception
instObj - The Instantiation objectsubjectDomain - The Subject Domain if it is role. If not, this
is nullsourceText - The source text of the composite policypublic void infoMessage(java.lang.String message)
public void warningMessage(java.lang.String message)
public void errorMessage(java.lang.String message)
public void buildMessage(java.lang.String message)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||