Class ThreadSafeVariableTreeTypeState
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.model.typesytem.VariableTypeState
-
- com._1c.g5.v8.dt.bsl.model.typesytem.VariableTreeTypeState
-
- com._1c.g5.v8.dt.bsl.model.typesytem.ThreadSafeVariableTreeTypeState
-
- All Implemented Interfaces:
IExpressionTypeState
,Comparable<VariableTypeState>
- Direct Known Subclasses:
VariableTreeTypeStateWithSubStates
public class ThreadSafeVariableTreeTypeState extends VariableTreeTypeState
SpecialVariableTreeTypeState
. This implementation is thread safe for working with collection ofTypeItem
,Expression
, depend states containing inVariableTreeTypeState
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.bsl.model.typesytem.VariableTreeTypeState
VariableTreeTypeState.CurrentNumTypesNumVisiting
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.bsl.model.typesytem.VariableTreeTypeState
dependStates, expressions
-
Fields inherited from class com._1c.g5.v8.dt.bsl.model.typesytem.VariableTypeState
blockNode, children, typesByDependedState, typesState
-
-
Constructor Summary
Constructors Constructor Description ThreadSafeVariableTreeTypeState(Variable variable, Environments envs, int offset, org.eclipse.xtext.nodemodel.INode blockNode)
Creates state
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDependState(VariableTreeTypeState state)
Adds depend state to the statevoid
addExpression(org.eclipse.xtext.util.Pair<Expression,List<VariableTreeTypeState>> expression)
Adds expresion to the statevoid
addType(TypeItem type)
Add type to statevoid
addTypes(VariableTypeState state)
Add type to state from another statevoid
addTypes(Collection<? extends TypeItem> types)
Add types to stateVariableTypeState
copyWithNewOffset(int newOffset)
Creates newVariableTypeState
with new offsetIterable<VariableTreeTypeState>
getDependStates()
Gets depended states on thisIterable<org.eclipse.xtext.util.Pair<Expression,List<VariableTreeTypeState>>>
getExpressions()
Gets expression corresponding to this stateIterable<TypeItem>
getTypes()
Gets all types associated with this state-
Methods inherited from class com._1c.g5.v8.dt.bsl.model.typesytem.VariableTreeTypeState
addAllowedType, addAllowedTypes, addSkipType, addSkipTypes, getPrevChildrenNumTypes, hasNewTypes, isDependOnCollection, isExpandTypeContextDef, isServerCall, setDependOnCollection, setExpandTypeContextDef, setHasNewTypes, setServerCall
-
Methods inherited from class com._1c.g5.v8.dt.bsl.model.typesytem.VariableTypeState
addChildState, addExpressionRelatedTypes, compareTo, getBlockOffset, getChildState, getEnvironments, getOffset, getParentState, getSemanticObject, getTypesSize, getVariable, hasTypes, setParentState
-
-
-
-
Constructor Detail
-
ThreadSafeVariableTreeTypeState
public ThreadSafeVariableTreeTypeState(Variable variable, Environments envs, int offset, org.eclipse.xtext.nodemodel.INode blockNode)
Creates state- Parameters:
variable
-Variable
in BSL associated with this stateenvs
-Environments
for this state, can't benull
offset
- position in document, where this state was createdblockNode
-INode
corresponding to the containmentBlock
in Built-In Language, can't benull
-
-
Method Detail
-
getTypes
public Iterable<TypeItem> getTypes()
Description copied from class:VariableTypeState
Gets all types associated with this state- Specified by:
getTypes
in interfaceIExpressionTypeState
- Overrides:
getTypes
in classVariableTreeTypeState
- Returns:
- list of
TypeItem
-
addType
public void addType(TypeItem type)
Description copied from interface:IExpressionTypeState
Add type to state- Specified by:
addType
in interfaceIExpressionTypeState
- Overrides:
addType
in classVariableTypeState
- Parameters:
type
- addingTypeItem
, can't benull
-
addTypes
public void addTypes(Collection<? extends TypeItem> types)
Description copied from interface:IExpressionTypeState
Add types to state- Specified by:
addTypes
in interfaceIExpressionTypeState
- Overrides:
addTypes
in classVariableTypeState
- Parameters:
types
- addingTypeItem
s, can't benull
-
addTypes
public void addTypes(VariableTypeState state)
Description copied from interface:IExpressionTypeState
Add type to state from another state- Specified by:
addTypes
in interfaceIExpressionTypeState
- Overrides:
addTypes
in classVariableTreeTypeState
- Parameters:
state
-VariableTypeState
for adding types, can't benull
-
getExpressions
public Iterable<org.eclipse.xtext.util.Pair<Expression,List<VariableTreeTypeState>>> getExpressions()
Description copied from class:VariableTreeTypeState
Gets expression corresponding to this state- Overrides:
getExpressions
in classVariableTreeTypeState
- Returns:
- list of
Expression
, nevernull
-
addExpression
public void addExpression(org.eclipse.xtext.util.Pair<Expression,List<VariableTreeTypeState>> expression)
Description copied from class:VariableTreeTypeState
Adds expresion to the state- Overrides:
addExpression
in classVariableTreeTypeState
- Parameters:
expression
- adding expression, can't benull
-
getDependStates
public Iterable<VariableTreeTypeState> getDependStates()
Description copied from class:VariableTreeTypeState
Gets depended states on this- Overrides:
getDependStates
in classVariableTreeTypeState
- Returns:
- list of
VariableTreeTypeState
, nevernull
-
addDependState
public void addDependState(VariableTreeTypeState state)
Description copied from class:VariableTreeTypeState
Adds depend state to the state- Overrides:
addDependState
in classVariableTreeTypeState
- Parameters:
state
- adding depend state, can't benull
-
copyWithNewOffset
public VariableTypeState copyWithNewOffset(int newOffset)
Description copied from class:VariableTypeState
Creates newVariableTypeState
with new offset- Overrides:
copyWithNewOffset
in classVariableTreeTypeState
- Parameters:
newOffset
- value of new offset- Returns:
- new
VariableTypeState
-
-