Class RuleEngineAnalyzer
java.lang.Object
org.palladiosimulator.somox.analyzer.rules.main.RuleEngineAnalyzer
The rule engine identifies PCM elements like components and interfaces inside source code via
rules specified by a user before. The output of this procedure is a
SourceCodeDecoratorRepositoryModel and a PCMRepository model. For this, the engine needs a
project directory, an output directory, a Java model and a IRule file.
To use the engine, invoke executeWith(projectPath, outPath, model, rules). To simplify the use,
the engine provides the public methods loadRules() and loadModel().
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
analyze
(RuleEngineConfiguration ruleEngineConfiguration, IProgressMonitor progressMonitor) static void
executeWith
(Path projectPath, Path outPath, List<org.eclipse.jdt.core.dom.CompilationUnit> model, Set<Rule> rules) Extracts PCM elements out of an existing Eclipse JDT model using an IRule file.static org.palladiosimulator.pcm.repository.Repository
Returns the current PCM repository model of the enginestatic Rule
Loads an external rules class file.
-
Constructor Details
-
RuleEngineAnalyzer
-
-
Method Details
-
getPCMRepository
public static org.palladiosimulator.pcm.repository.Repository getPCMRepository()Returns the current PCM repository model of the engine- Returns:
- the PCM repository model
-
analyze
public void analyze(RuleEngineConfiguration ruleEngineConfiguration, IProgressMonitor progressMonitor) throws RuleEngineException - Throws:
RuleEngineException
-
executeWith
public static void executeWith(Path projectPath, Path outPath, List<org.eclipse.jdt.core.dom.CompilationUnit> model, Set<Rule> rules) Extracts PCM elements out of an existing Eclipse JDT model using an IRule file.- Parameters:
projectPath
- the project directoryoutPath
- the output directorymodel
- the Java modelruleDoc
- the object containing the rules
-
loadRules
Loads an external rules class file. For that the full qualified name of the xtend class has to be known- Parameters:
namespace
- the string containing the namespace of the class implementing the IRule Interfacerules
- the path to a .class file containing the rules- Returns:
- the rules from the specified (via gui) file system place
-