Class RuleEngineAnalyzer

java.lang.Object
org.palladiosimulator.somox.analyzer.rules.main.RuleEngineAnalyzer

public class RuleEngineAnalyzer extends Object
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 Details

  • 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 directory
      outPath - the output directory
      model - the Java model
      ruleDoc - the object containing the rules
    • loadRules

      public static Rule loadRules(String namespace, Path rulesFile)
      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 Interface
      rules - the path to a .class file containing the rules
      Returns:
      the rules from the specified (via gui) file system place