Package com._1c.g5.v8.dt.bsl.common
Class VariableProcessor
- java.lang.Object
- 
- com._1c.g5.v8.dt.bsl.common.StaticFeatureAccessProcessor
- 
- com._1c.g5.v8.dt.bsl.common.VariableProcessor
 
 
- 
- Direct Known Subclasses:
- com._1c.g5.v8.dt.internal.bsl.ui.refactoring.StaticFeatureAccessProcessorForExtractRefactoring
 
 public class VariableProcessor extends StaticFeatureAccessProcessor SpecialStaticFeatureAccessProcessorfor found allVariablethat change value and
 Variablefor read values from it Instances ofStatementProcessorForExtractRefactoringare stateful and are not safe for use by multiple threads.
- 
- 
Field SummaryFields Modifier and Type Field Description protected DynamicFeatureAccessComputertypeComputerprotected Map<Variable,List<org.eclipse.xtext.nodemodel.INode>>variablesChangeValueprotected Map<Variable,List<org.eclipse.xtext.nodemodel.INode>>variablesForReadValue
 - 
Constructor SummaryConstructors Constructor Description VariableProcessor(Collection<Statement> allStatements, DynamicFeatureAccessComputer typeComputer)Initialize with collection of Statements
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddNewVariable(Variable variable, org.eclipse.xtext.nodemodel.INode node, Map<Variable,List<org.eclipse.xtext.nodemodel.INode>> variables)Add variable tovariablesprotected voiddoProcess(StaticFeatureAccess sfa, boolean targetOfAssignment)Function to perform processing of eachStaticFeatureAccesscontaining in theBlock.protected booleanisRefMethodParam(StaticFeatureAccess sfa)Checks thatsfais part of method callMap<Variable,List<org.eclipse.xtext.nodemodel.INode>>variablesForChangeValue()Gets all variables and their nodes which change valueMap<Variable,List<org.eclipse.xtext.nodemodel.INode>>variablesForReadValue()Gets all variables and their nodes from which values are read- 
Methods inherited from class com._1c.g5.v8.dt.bsl.common.StaticFeatureAccessProcessordoProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, isCanceled, process
 
- 
 
- 
- 
- 
Constructor Detail- 
VariableProcessorpublic VariableProcessor(Collection<Statement> allStatements, DynamicFeatureAccessComputer typeComputer) Initialize with collection of Statements- Parameters:
- allStatements- collection of the- Statement, can't be- null
- typeComputer-- DynamicFeatureAccessComputerfor resolve object in- DynamicFeatureAccess, can't be- null
 
 
- 
 - 
Method Detail- 
variablesForChangeValuepublic 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
 
 - 
variablesForReadValuepublic 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
 
 - 
doProcessprotected void doProcess(StaticFeatureAccess sfa, boolean targetOfAssignment) Description copied from class:StaticFeatureAccessProcessorFunction to perform processing of eachStaticFeatureAccesscontaining in theBlock.- Specified by:
- doProcessin class- StaticFeatureAccessProcessor
- Parameters:
- sfa-- StaticFeatureAccessinstance to process. Not- null.
- targetOfAssignment-- trueif passed- StaticFeatureAccessrepresents target of assignment (single variable in the left side of assignment or loop variable in the For statement)
 
 - 
isRefMethodParamprotected boolean isRefMethodParam(StaticFeatureAccess sfa) Checks thatsfais part of method call- Parameters:
- sfa- checking- StaticFeatureAccess, can't be- null
- Returns:
- trueif- sfais part of method call,- falseotherwise
 
 - 
addNewVariableprotected void addNewVariable(Variable variable, org.eclipse.xtext.nodemodel.INode node, Map<Variable,List<org.eclipse.xtext.nodemodel.INode>> variables) Add variable tovariables- Parameters:
- variable- add variable, can't be- null
- node- actual- INodeof variable, can't be- null
- variables- container for adding, can't be- null
 
 
- 
 
-