Class VariableProcessor

java.lang.Object
com._1c.g5.v8.dt.bsl.common.StaticFeatureAccessProcessor
com._1c.g5.v8.dt.bsl.common.VariableProcessor
Direct Known Subclasses:
StaticFeatureAccessProcessorForExtractRefactoring

public class VariableProcessor extends StaticFeatureAccessProcessor
Special StaticFeatureAccessProcessor for found all Variable that change value and
Variable for read values from it Instances of StatementProcessorForExtractRefactoring are stateful and are not safe for use by multiple threads.
  • Field Details

    • typeComputer

      protected final DynamicFeatureAccessComputer typeComputer
    • variablesChangeValue

      protected Map<Variable,List<org.eclipse.xtext.nodemodel.INode>> variablesChangeValue
    • variablesForReadValue

      protected Map<Variable,List<org.eclipse.xtext.nodemodel.INode>> variablesForReadValue
  • Constructor Details

  • Method Details

    • variablesForChangeValue

      public Map<Variable,List<org.eclipse.xtext.nodemodel.INode>> variablesForChangeValue()
      Gets all variables and their nodes which change value
      Returns:
      accordance between variables which change value and their INode
    • variablesForReadValue

      public Map<Variable,List<org.eclipse.xtext.nodemodel.INode>> variablesForReadValue()
      Gets all variables and their nodes from which values are read
      Returns:
      accordance between variables from which values are read and their INode
    • doProcess

      protected void doProcess(StaticFeatureAccess sfa, boolean targetOfAssignment)
      Description copied from class: StaticFeatureAccessProcessor
      Function to perform processing of each StaticFeatureAccess containing in the Block.
      Specified by:
      doProcess in class StaticFeatureAccessProcessor
      Parameters:
      sfa - StaticFeatureAccess instance to process. Not null.
      targetOfAssignment - true if passed StaticFeatureAccess represents target of assignment (single variable in the left side of assignment or loop variable in the For statement)
    • isRefMethodParam

      protected boolean isRefMethodParam(StaticFeatureAccess sfa)
      Checks that sfa is part of method call
      Parameters:
      sfa - checking StaticFeatureAccess, can't be null
      Returns:
      true if sfa is part of method call, false otherwise
    • addNewVariable

      protected void addNewVariable(Variable variable, org.eclipse.xtext.nodemodel.INode node, Map<Variable,List<org.eclipse.xtext.nodemodel.INode>> variables)
      Add variable to variables
      Parameters:
      variable - add variable, can't be null
      node - actual INode of variable, can't be null
      variables - container for adding, can't be null