Class Retriever
java.lang.Object
org.palladiosimulator.retriever.core.main.Retriever
Retriever 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
ConstructorsConstructorDescriptionRetriever(org.palladiosimulator.retriever.services.blackboard.RetrieverBlackboard blackboard) -
Method Summary
Modifier and TypeMethodDescriptionvoidanalyze(org.palladiosimulator.retriever.services.RetrieverConfiguration configuration, IProgressMonitor progressMonitor) static voidexecuteWith(Path projectPath, Path outPath, List<org.eclipse.jdt.core.dom.CompilationUnit> model, Set<org.palladiosimulator.retriever.services.Rule> rules) Extracts PCM elements out of an existing Eclipse JDT model using an IRule file.static org.palladiosimulator.pcm.repository.RepositoryReturns the current PCM repository model of the enginestatic org.palladiosimulator.retriever.services.RuleLoads an external rules class file.
-
Constructor Details
-
Retriever
public Retriever(org.palladiosimulator.retriever.services.blackboard.RetrieverBlackboard blackboard)
-
-
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(org.palladiosimulator.retriever.services.RetrieverConfiguration configuration, IProgressMonitor progressMonitor) throws RetrieverException - Throws:
RetrieverException
-
executeWith
public static void executeWith(Path projectPath, Path outPath, List<org.eclipse.jdt.core.dom.CompilationUnit> model, Set<org.palladiosimulator.retriever.services.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
public static org.palladiosimulator.retriever.services.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 Interfacerules- the path to a .class file containing the rules- Returns:
- the rules from the specified (via gui) file system place
-