Class Ast2SeffVisitor
java.lang.Object
org.eclipse.jdt.core.dom.ASTVisitor
org.palladiosimulator.somox.ast2seff.visitors.Ast2SeffVisitor
public class Ast2SeffVisitor
extends org.eclipse.jdt.core.dom.ASTVisitor
-
Constructor Summary
ConstructorDescriptionAst2SeffVisitor
(org.palladiosimulator.generator.fluent.repository.api.seff.ActionSeff actionSeff, org.eclipse.jdt.core.dom.ASTNode rootNode, Map<org.eclipse.jdt.core.dom.ASTNode, org.palladiosimulator.pcm.seff.ServiceEffectSpecification> externalNodes, org.palladiosimulator.generator.fluent.repository.factory.FluentRepositoryFactory fluentFactory) Constructor for the visitor object Sets all relevant variables for the public visit functions of the class -
Method Summary
Modifier and TypeMethodDescriptionstatic org.palladiosimulator.generator.fluent.repository.api.seff.ActionSeff
perform
(org.palladiosimulator.generator.fluent.repository.api.seff.ActionSeff actionSeff, org.eclipse.jdt.core.dom.ASTNode rootNode, Map<org.eclipse.jdt.core.dom.ASTNode, org.palladiosimulator.pcm.seff.ServiceEffectSpecification> externalNodes, org.palladiosimulator.generator.fluent.repository.factory.FluentRepositoryFactory fluentFactory) Function to start the traversal of a MethodDeclarationboolean
visit
(org.eclipse.jdt.core.dom.EnhancedForStatement enhancedForStatement) Transformation of a EnhancedForStatement to a LoopActionboolean
visit
(org.eclipse.jdt.core.dom.ExpressionStatement expressionStatement) Transform an expression statement to a Method Inlining, Internal Action or External Actionboolean
visit
(org.eclipse.jdt.core.dom.ForStatement forStatement) Transformation of a ForStatement to a LoopActionboolean
visit
(org.eclipse.jdt.core.dom.IfStatement ifStatement) Transformation of an IfStatement to a BranchActionboolean
visit
(org.eclipse.jdt.core.dom.ReturnStatement returnStatement) Generate Set Variable Action for functions with a return statementboolean
visit
(org.eclipse.jdt.core.dom.SwitchStatement switchStatement) Transformation of a SwitchStatement to a BranchAction Usage of the SwitchStatementUtil to break down the different cases to different blocksboolean
visit
(org.eclipse.jdt.core.dom.SynchronizedStatement synchronizedStatement) Transformation of an SynchronizedStatement to a AcquireAction and ReleaseAction with the body between the two actions For all synchronized statements in on component only one passive resource gets modeledboolean
visit
(org.eclipse.jdt.core.dom.TryStatement tryStatement) Transformation of a TryStatement to a BranchActionboolean
visit
(org.eclipse.jdt.core.dom.VariableDeclarationStatement variableDeclarationStatement) Limitation / Future Work Set Variable Actions only should be modeled for functions with return statementboolean
visit
(org.eclipse.jdt.core.dom.WhileStatement whileStatement) Transformation of a WhileStatement to a LoopActionMethods inherited from class org.eclipse.jdt.core.dom.ASTVisitor
endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, postVisit, preVisit, preVisit2, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Constructor Details
-
Ast2SeffVisitor
public Ast2SeffVisitor(org.palladiosimulator.generator.fluent.repository.api.seff.ActionSeff actionSeff, org.eclipse.jdt.core.dom.ASTNode rootNode, Map<org.eclipse.jdt.core.dom.ASTNode, org.palladiosimulator.pcm.seff.ServiceEffectSpecification> externalNodes, org.palladiosimulator.generator.fluent.repository.factory.FluentRepositoryFactory fluentFactory) Constructor for the visitor object Sets all relevant variables for the public visit functions of the class- Parameters:
methodPalladioInformation
- object to give access to necessary transformation informationactionSeff
- current action SEFF creator object which is used to model the SEFF elementsmethodPalladionInfoMap
- object to give access to the information of all methods which should be modeledcomponentInformation
- object for the current SEFF component which gets modeledfluentFactory
- factory object to create additional SEFF elements and fetch created SEFF elements from the repository
-
-
Method Details
-
perform
public static org.palladiosimulator.generator.fluent.repository.api.seff.ActionSeff perform(org.palladiosimulator.generator.fluent.repository.api.seff.ActionSeff actionSeff, org.eclipse.jdt.core.dom.ASTNode rootNode, Map<org.eclipse.jdt.core.dom.ASTNode, org.palladiosimulator.pcm.seff.ServiceEffectSpecification> externalNodes, org.palladiosimulator.generator.fluent.repository.factory.FluentRepositoryFactory fluentFactory) Function to start the traversal of a MethodDeclaration- Parameters:
methodPalladioInformation
- object to give access to necessary transformation informationactionSeff
- current action SEFF creator object which is used to model the SEFF elementsmethodPalladionInfoMap
- object to give access to the information of all methods which should be modeledcomponentInformation
- object for the current SEFF component which gets modeledfluentFactory
- factory object to create additional SEFF elements and fetch created SEFF elements from the repository- Returns:
- ActionSeff object which contains the transformed the complete MethodDeclaration
-
visit
public boolean visit(org.eclipse.jdt.core.dom.ExpressionStatement expressionStatement) Transform an expression statement to a Method Inlining, Internal Action or External Action- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
- Parameters:
expressionStatement
- statement to transform- Returns:
- always false, no further visiting of child elements
-
visit
public boolean visit(org.eclipse.jdt.core.dom.IfStatement ifStatement) Transformation of an IfStatement to a BranchAction- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
- Parameters:
ifStatement
- statement to transform- Returns:
- always false, no further visiting of child elements
-
visit
public boolean visit(org.eclipse.jdt.core.dom.SynchronizedStatement synchronizedStatement) Transformation of an SynchronizedStatement to a AcquireAction and ReleaseAction with the body between the two actions For all synchronized statements in on component only one passive resource gets modeled- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
- Parameters:
synchronizedStatement
- statement to transform- Returns:
- always false, no further visiting of child elements
-
visit
public boolean visit(org.eclipse.jdt.core.dom.TryStatement tryStatement) Transformation of a TryStatement to a BranchAction- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
- Parameters:
tryStatement
- statement to transform- Returns:
- always false, no further visiting of child elements
-
visit
public boolean visit(org.eclipse.jdt.core.dom.ForStatement forStatement) Transformation of a ForStatement to a LoopAction- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
- Parameters:
forStatement
- statement to transform- Returns:
- always false, no further visiting of child elements
-
visit
public boolean visit(org.eclipse.jdt.core.dom.EnhancedForStatement enhancedForStatement) Transformation of a EnhancedForStatement to a LoopAction- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
- Parameters:
enhancedForStatement
- statement to transform- Returns:
- always false, no further visiting of child elements
-
visit
public boolean visit(org.eclipse.jdt.core.dom.WhileStatement whileStatement) Transformation of a WhileStatement to a LoopAction- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
- Parameters:
whileStatement
- statement to transform- Returns:
- always false, no further visiting of child elements
-
visit
public boolean visit(org.eclipse.jdt.core.dom.SwitchStatement switchStatement) Transformation of a SwitchStatement to a BranchAction Usage of the SwitchStatementUtil to break down the different cases to different blocks- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
- Parameters:
switchStatement
- statement to transform- Returns:
- always false, no further visiting of child elements
-
visit
public boolean visit(org.eclipse.jdt.core.dom.ReturnStatement returnStatement) Generate Set Variable Action for functions with a return statement- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
- Parameters:
returnStatement
- return statement of the function containing the object which gets returned- Returns:
- always false, no further visiting of child elements
-
visit
public boolean visit(org.eclipse.jdt.core.dom.VariableDeclarationStatement variableDeclarationStatement) Limitation / Future Work Set Variable Actions only should be modeled for functions with return statement- Overrides:
visit
in classorg.eclipse.jdt.core.dom.ASTVisitor
-