|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.mtl.parser.ast.ASTFactory
public class ASTFactory
The class used to create and store the objects of the AST model. You have to call 'initOCL' to initialize the OCL environment.
| Field Summary | |
|---|---|
protected OCLParser |
pOCL
To parse an OCL Expression with the OCL plug-in. |
| Constructor Summary | |
|---|---|
ASTFactory()
Constructor. |
|
| Method Summary | |
|---|---|
OCLParser |
getOCL()
Gets the OCL parser (from the OCL plug-in). |
protected Block |
getOrCreateBlock(Block iBlock)
Gets or creates an AST Block corresponding to a CST Block. |
protected FileBlock |
getOrCreateFileBlock(FileBlock iFileBlock)
Gets or creates an AST FileBlock corresponding to a CST FileBlock. |
protected ForBlock |
getOrCreateForBlock(ForBlock iForBlock)
Gets or creates an AST ForBlock corresponding to a CST ForBlock. |
protected IfBlock |
getOrCreateIfBlock(IfBlock iIfBlock)
Gets or creates an AST IfBlock corresponding to a CST IfBlock. |
protected InitSection |
getOrCreateInitSection(InitSection iInitSection)
Gets or creates an AST InitSection corresponding to a CST InitSection. |
protected LetBlock |
getOrCreateLetBlock(LetBlock iLetBlock)
Gets or creates an AST LetBlock corresponding to a CST LetBlock. |
protected Macro |
getOrCreateMacro(Macro iMacro)
Gets or creates an AST Macro corresponding to a CST Macro. |
protected Module |
getOrCreateModule(Module iModule)
Gets or creates an AST Module corresponding to a CST Module. |
protected org.eclipse.ocl.ecore.OCLExpression |
getOrCreateOCLExpression(ModelExpression iModelExpression)
Gets or creates an AST OCLExpression corresponding to a CST OCLExpression. |
protected ProtectedAreaBlock |
getOrCreateProtectedAreaBlock(ProtectedAreaBlock iProtectedAreaBlock)
Gets or creates an AST ProtectedAreaBlock corresponding to a CST ProtectedAreaBlock. |
protected Query |
getOrCreateQuery(Query iQuery)
Gets or creates an AST Query corresponding to a CST Query. |
protected org.eclipse.ocl.ecore.StringLiteralExp |
getOrCreateStringLiteralExp(TextExpression iTextExpression)
Gets or creates an AST StringLiteralExp corresponding to a CST TextExpression. |
protected Template |
getOrCreateTemplate(Template iTemplate)
Gets or creates an AST Template corresponding to a CST Template. |
protected TemplateExpression |
getOrCreateTemporaryTemplateExpression(TemplateExpression iTemplateExpression)
Gets or creates an AST TemplateExpression corresponding to a CST TemplateExpression. |
protected TraceBlock |
getOrCreateTraceBlock(TraceBlock iTraceBlock)
Gets or creates an AST TraceBlock corresponding to a CST TraceBlock. |
protected TypedModel |
getOrCreateTypedModel(TypedModel iTypedModel)
Gets or creates an AST TypedModel corresponding to a CST TypedModel. |
protected org.eclipse.ocl.ecore.Variable |
getOrCreateVariable(Variable iVariable)
Gets or creates an AST Variable corresponding to a CST Variable. |
protected TemplateExpression |
getTemporaryTemplateExpression(TemplateExpression iTemplateExpression)
Gets (but not create) an AST TemplateExpression corresponding to a CST TemplateExpression. |
void |
initOCL(org.eclipse.emf.ecore.resource.Resource resourceOCL)
Initializes the OCL environment. |
protected void |
log(java.lang.String message,
int posBegin,
int posEnd)
To log a new problem. |
void |
setLogHandler(IASTLogHandler logHandler)
Sets the log Handler to save AST logging messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected OCLParser pOCL
| Constructor Detail |
|---|
public ASTFactory()
| Method Detail |
|---|
public void initOCL(org.eclipse.emf.ecore.resource.Resource resourceOCL)
resourceOCL - is the resource used to keep the OCL environmentpublic OCLParser getOCL()
public void setLogHandler(IASTLogHandler logHandler)
logHandler - is the new log handlerprotected Module getOrCreateModule(Module iModule)
iModule - is the input object of type 'org.eclipse.mtl.cst.Module'
protected TypedModel getOrCreateTypedModel(TypedModel iTypedModel)
iTypedModel - is the input object of type 'org.eclipse.mtl.cst.TypedModel'
protected Template getOrCreateTemplate(Template iTemplate)
iTemplate - is the input object of type 'org.eclipse.mtl.cst.Template'
protected org.eclipse.ocl.ecore.Variable getOrCreateVariable(Variable iVariable)
iVariable - is the input object of type 'org.eclipse.mtl.cst.Variable'
protected TemplateExpression getOrCreateTemporaryTemplateExpression(TemplateExpression iTemplateExpression)
iTemplateExpression - is the input object of type 'org.eclipse.mtl.cst.TemplateExpression'
protected TemplateExpression getTemporaryTemplateExpression(TemplateExpression iTemplateExpression)
iTemplateExpression - is the input object of type 'org.eclipse.mtl.cst.TemplateExpression'
protected org.eclipse.ocl.ecore.OCLExpression getOrCreateOCLExpression(ModelExpression iModelExpression)
iModelExpression - is the input object of type 'org.eclipse.mtl.cst.ModelExpression'
protected org.eclipse.ocl.ecore.StringLiteralExp getOrCreateStringLiteralExp(TextExpression iTextExpression)
iTextExpression - is the input object of type 'org.eclipse.mtl.cst.TextExpression'
protected Block getOrCreateBlock(Block iBlock)
iBlock - is the input object of type 'org.eclipse.mtl.cst.Block'
protected InitSection getOrCreateInitSection(InitSection iInitSection)
iInitSection - is the input object of type 'org.eclipse.mtl.cst.InitSection'
protected ProtectedAreaBlock getOrCreateProtectedAreaBlock(ProtectedAreaBlock iProtectedAreaBlock)
iProtectedAreaBlock - is the input object of type 'org.eclipse.mtl.cst.ProtectedAreaBlock'
protected ForBlock getOrCreateForBlock(ForBlock iForBlock)
iForBlock - is the input object of type 'org.eclipse.mtl.cst.ForBlock'
protected IfBlock getOrCreateIfBlock(IfBlock iIfBlock)
iIfBlock - is the input object of type 'org.eclipse.mtl.cst.IfBlock'
protected LetBlock getOrCreateLetBlock(LetBlock iLetBlock)
iLetBlock - is the input object of type 'org.eclipse.mtl.cst.LetBlock'
protected FileBlock getOrCreateFileBlock(FileBlock iFileBlock)
iFileBlock - is the input object of type 'org.eclipse.mtl.cst.FileBlock'
protected TraceBlock getOrCreateTraceBlock(TraceBlock iTraceBlock)
iTraceBlock - is the input object of type 'org.eclipse.mtl.cst.TraceBlock'
protected Macro getOrCreateMacro(Macro iMacro)
iMacro - is the input object of type 'org.eclipse.mtl.cst.Macro'
protected Query getOrCreateQuery(Query iQuery)
iQuery - is the input object of type 'org.eclipse.mtl.cst.Query'
protected void log(java.lang.String message,
int posBegin,
int posEnd)
message - is the messageposBegin - is the beginning index of the problemposEnd - is the ending index of the problem
|
Copyright 2008 Obeo All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||