public class EmgModule extends EplModule implements IEmgModule
AbstractEplModule.LazyAdvancedRoleInstancesInitializer, AbstractEplModule.LazyBasicRoleInstancesInitializer
declaredPatterns, INFINITE, maxLoops, patternMatchModelName, patterns, repeatWhileMatchesFound
declaredPost, declaredPre, post, pre
compilationContext, context, declaredModelDeclarations, declaredOperations, imports, main, modelDeclarations, operations, postOperationStatements
parseProblems, parser, sourceFile, sourceUri
Constructor and Description |
---|
EmgModule() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
containAny(Collection<Object> first,
Collection<Object> last)
Contain any.
|
protected void |
executeCreateOperations()
Execute the create operations in the EMG script.
|
protected double |
getFloat(Object object)
Gets the float.
|
HashMap<String,Class<?>> |
getImportConfiguration() |
protected int |
getInt(Object object)
Gets the int.
|
Map<String,List<Object>> |
getNamedCreatedObjects() |
List<PatternMatch> |
match(Pattern pattern)
This method provides the main high-level execution logic for EPL.
|
protected void |
prepareContext() |
Object |
processRules()
Main rule processing logic.
|
void |
setSeed(long seed) |
void |
setUseSeed(boolean useSeed) |
createCombinationGenerator, getCandidates, initGenerator, wrapAdvancedRoleInstances, wrapBasicRoleInstances
adapt, build, createLexer, createModel, createParser, createPatternMatch, executeDoBlock, filterElements, flatMapRoleBindings, getContext, getDeclaredPatterns, getMainRule, getMatchResult, getMaxLoops, getPatterns, getRoleInstances, getVariables, isRepeatWhileMatches, isValidCombination, matchCombination, matchPatterns, matchPatterns, negativeGuard, postProcessMatches, preMatch, putRoleBindingsIntoFrame, setMaxLoops, setRepeatWhileMatches
calculateSuperRules, execute, execute, executeImpl, getDeclaredPost, getDeclaredPre, getPost, getPre, postExecution, prepareExecution
checkImports, clearCache, compile, execute, getCompilationContext, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getImportsByExtension, getMain, getModelDelcarations, getOperations, getParentModule, getPostOperationStatements, setContext, setMain, setParentModule, toString
assignAnnotations, assignComment, assignComments, createAst, extractComments, getParseProblems, getSourceFile, getSourceUri, invokeMainRule, parse, parse
equals, getChildren, getComments, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDeclaredPatterns, getMaximumLevel, getMaxLoops, getPatterns, isRepeatWhileMatches, matchPatterns, setMaxLoops, setRepeatWhileMatches
getContext, getDeclaredPost, getDeclaredPre, getPost, getPre
configure, execute, getCompilationContext, getConfigurationProperties, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getMain, getModelDelcarations, getOperations, getParentModule, getParseProblems, getPostOperationStatements, parse, setContext, setParentModule
public void setSeed(long seed)
setSeed
in interface IEmgModule
seed
- the seed to setpublic void setUseSeed(boolean useSeed)
setUseSeed
in interface IEmgModule
useSeed
- the useSeed to setpublic Map<String,List<Object>> getNamedCreatedObjects()
getNamedCreatedObjects
in interface IEmgModule
public HashMap<String,Class<?>> getImportConfiguration()
getImportConfiguration
in class AbstractEplModule
protected void prepareContext() throws EolRuntimeException
prepareContext
in class EolModule
EolRuntimeException
public Object processRules() throws EolRuntimeException
ErlModule
processRules
in class AbstractEplModule
EolRuntimeException
protected void executeCreateOperations() throws EolRuntimeException
EolModelElementTypeNotFoundException
- the eol model element type not
found exceptionEolRuntimeException
- If the type to be instantiated
can't be found or any of the
random functions fails.public List<PatternMatch> match(Pattern pattern) throws EolRuntimeException
AbstractEplModule
AbstractEplModule.matchPatterns(int, PatternMatchModel)
) and the low-level ones (e.g.
AbstractEplModule.getRoleInstances(Role, String)
). AbstractEplModule.matchCombination(Collection, Pattern)
, and so the sole responsibility
of this method is to loop through the combinations returned by AbstractEplModule.getCandidates(Pattern)
and collect all the results. Subclasses may override this method to alter the type of collection
returned and/or alter the looping mechanism.match
in interface IEplModule
match
in class AbstractEplModule
EolRuntimeException
protected int getInt(Object object)
object
- the objectprotected double getFloat(Object object)
object
- the objectprotected boolean containAny(Collection<Object> first, Collection<Object> last)
first
- the firstlast
- the lastCopyright © 2020. All rights reserved.