Package org.eclipse.epsilon.eol
Class EolModule
- java.lang.Object
-
- org.eclipse.epsilon.common.module.AbstractModuleElement
-
- org.eclipse.epsilon.eol.AbstractModule
-
- org.eclipse.epsilon.eol.EolModule
-
- All Implemented Interfaces:
IModule
,ModuleElement
,IEolModule
- Direct Known Subclasses:
EglModule
,EolModuleParallel
,ErlModule
,EUnitModule
,EwlModule
,HutnModule
public class EolModule extends AbstractModule implements IEolModule
-
-
Field Summary
Fields Modifier and Type Field Description protected IEolContext
context
protected List<ModelDeclaration>
declaredModelDeclarations
protected OperationList
declaredOperations
protected List<Import>
imports
protected StatementBlock
main
protected Set<ModelDeclaration>
modelDeclarations
protected OperationList
operations
protected List<Statement>
postOperationStatements
-
Fields inherited from class org.eclipse.epsilon.eol.AbstractModule
parseProblems, parser, sourceFile, sourceUri
-
-
Constructor Summary
Constructors Constructor Description EolModule()
EolModule(IEolContext context)
Instantiates the module with the specified execution context.
-
Method Summary
-
Methods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getParseProblems, getSourceFile, getSourceUri, invokeMainRule, parse, parse
-
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.eol.IEolModule
configure, getConfigurationProperties, getParseProblems, parse
-
Methods inherited from interface org.eclipse.epsilon.common.module.IModule
createAst, getSourceUri, parse, parse, parse, parse, parse
-
Methods inherited from interface org.eclipse.epsilon.common.module.ModuleElement
getChildren, getComments, getData, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
-
-
-
Field Detail
-
main
protected StatementBlock main
-
context
protected IEolContext context
-
declaredOperations
protected OperationList declaredOperations
-
operations
protected OperationList operations
-
declaredModelDeclarations
protected List<ModelDeclaration> declaredModelDeclarations
-
modelDeclarations
protected Set<ModelDeclaration> modelDeclarations
-
-
Constructor Detail
-
EolModule
public EolModule()
-
EolModule
public EolModule(IEolContext context)
Instantiates the module with the specified execution context.- Parameters:
context
- The execution context- Since:
- 1.6
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classAbstractModuleElement
-
adapt
public ModuleElement adapt(AST cst, ModuleElement parentAst)
- Specified by:
adapt
in classAbstractModule
-
createLexer
protected org.antlr.runtime.Lexer createLexer(org.antlr.runtime.ANTLRInputStream inputStream)
- Specified by:
createLexer
in classAbstractModule
-
createParser
public EpsilonParser createParser(org.antlr.runtime.TokenStream tokenStream)
- Specified by:
createParser
in classAbstractModule
-
getMainRule
public String getMainRule()
- Specified by:
getMainRule
in classAbstractModule
-
getDeclaredOperations
public OperationList getDeclaredOperations()
- Specified by:
getDeclaredOperations
in interfaceIEolModule
-
prepareContext
protected void prepareContext() throws EolRuntimeException
- Throws:
EolRuntimeException
-
getImports
public List<Import> getImports()
- Specified by:
getImports
in interfaceIEolModule
-
toString
public String toString()
- Overrides:
toString
in classAbstractModuleElement
-
getModelDeclarations
public Set<ModelDeclaration> getModelDeclarations()
- Specified by:
getModelDeclarations
in interfaceIEolModule
-
getOperations
public OperationList getOperations()
- Specified by:
getOperations
in interfaceIEolModule
-
getImportsByExtension
protected Collection<Import> getImportsByExtension(AST cst, String extension, Class<?> moduleImplClass)
-
checkImports
protected void checkImports(AST cst)
-
getDeclaredModelDeclarations
public List<ModelDeclaration> getDeclaredModelDeclarations()
- Specified by:
getDeclaredModelDeclarations
in interfaceIEolModule
-
getParentModule
public IEolModule getParentModule()
- Specified by:
getParentModule
in interfaceIEolModule
-
setParentModule
public void setParentModule(IEolModule parent)
- Specified by:
setParentModule
in interfaceIEolModule
-
execute
public Object execute() throws EolRuntimeException
- Specified by:
execute
in interfaceIEolModule
- Throws:
EolRuntimeException
-
executeImpl
public Object executeImpl() throws EolRuntimeException
- Throws:
EolRuntimeException
-
getPostOperationStatements
public List<Statement> getPostOperationStatements()
- Specified by:
getPostOperationStatements
in interfaceIEolModule
-
getMain
public StatementBlock getMain()
- Specified by:
getMain
in interfaceIEolModule
-
setMain
public void setMain(StatementBlock main)
-
getContext
public IEolContext getContext()
- Specified by:
getContext
in interfaceIEolModule
-
setContext
public void setContext(IEolContext context)
- Specified by:
setContext
in interfaceIEolModule
-
clearCache
public void clearCache()
Clear all cached results and type information, and all extended properties. Useful for rerunning the same EolModule with different sets of models, without having to parse it again.
-
-