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:
StaticFeatureAccessProcessorForExtractRefactoring
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVariableProcessor(Collection<Statement> allStatements, DynamicFeatureAccessComputer typeComputer) Initialize with collection of Statements -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 booleanChecks thatsfais part of method callGets all variables and their nodes which change valueGets all variables and their nodes from which values are readMethods inherited from class com._1c.g5.v8.dt.bsl.common.StaticFeatureAccessProcessor
doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, doProcessInternal, isCanceled, process
-
Field Details
-
typeComputer
-
variablesChangeValue
-
variablesForReadValue
-
-
Constructor Details
-
VariableProcessor
public VariableProcessor(Collection<Statement> allStatements, DynamicFeatureAccessComputer typeComputer) Initialize with collection of Statements- Parameters:
allStatements- collection of theStatement, can't benulltypeComputer-DynamicFeatureAccessComputerfor resolve object inDynamicFeatureAccess, can't benull
-
-
Method Details
-
variablesForChangeValue
Gets all variables and their nodes which change value- Returns:
- accordance between variables which change value and their
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
Description copied from class:StaticFeatureAccessProcessorFunction to perform processing of eachStaticFeatureAccesscontaining in theBlock.- Specified by:
doProcessin classStaticFeatureAccessProcessor- Parameters:
sfa-StaticFeatureAccessinstance to process. Notnull.targetOfAssignment-trueif passedStaticFeatureAccessrepresents target of assignment (single variable in the left side of assignment or loop variable in the For statement)
-
isRefMethodParam
Checks thatsfais part of method call- Parameters:
sfa- checkingStaticFeatureAccess, can't benull- Returns:
trueifsfais part of method call,falseotherwise
-
addNewVariable
protected 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 benullnode- actualINodeof variable, can't benullvariables- container for adding, can't benull
-