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

    Constructors
    Constructor
    Description
    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
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    boolean
    visit(org.eclipse.jdt.core.dom.EnhancedForStatement enhancedForStatement)
    Transformation of a EnhancedForStatement to a LoopAction
    boolean
    visit(org.eclipse.jdt.core.dom.ExpressionStatement expressionStatement)
    Transform an expression statement to a Method Inlining, Internal Action or External Action
    boolean
    visit(org.eclipse.jdt.core.dom.ForStatement forStatement)
    Transformation of a ForStatement to a LoopAction
    boolean
    visit(org.eclipse.jdt.core.dom.IfStatement ifStatement)
    Transformation of an IfStatement to a BranchAction
    boolean
    visit(org.eclipse.jdt.core.dom.ReturnStatement returnStatement)
    Generate Set Variable Action for functions with a return statement
    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
    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
    boolean
    visit(org.eclipse.jdt.core.dom.TryStatement tryStatement)
    Transformation of a TryStatement to a BranchAction
    boolean
    visit(org.eclipse.jdt.core.dom.VariableDeclarationStatement variableDeclarationStatement)
    Limitation / Future Work Set Variable Actions only should be modeled for functions with return statement
    boolean
    visit(org.eclipse.jdt.core.dom.WhileStatement whileStatement)
    Transformation of a WhileStatement to a LoopAction

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 information
      actionSeff - current action SEFF creator object which is used to model the SEFF elements
      methodPalladionInfoMap - object to give access to the information of all methods which should be modeled
      componentInformation - object for the current SEFF component which gets modeled
      fluentFactory - 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 information
      actionSeff - current action SEFF creator object which is used to model the SEFF elements
      methodPalladionInfoMap - object to give access to the information of all methods which should be modeled
      componentInformation - object for the current SEFF component which gets modeled
      fluentFactory - 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 class org.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 class org.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 class org.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 class org.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 class org.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 class org.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 class org.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 class org.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 class org.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 class org.eclipse.jdt.core.dom.ASTVisitor