Class VariableTreeTypeStateWithSubStates
- 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
-
- com._1c.g5.v8.dt.bsl.model.typesytem.VariableTreeTypeStateWithSubStates
-
- All Implemented Interfaces:
IExpressionTypeState
,Comparable<VariableTypeState>
- Direct Known Subclasses:
PromiseVariableTreeTypeStateWithSubStates
public class VariableTreeTypeStateWithSubStates extends ThreadSafeVariableTreeTypeState
SpecialThreadSafeVariableTreeTypeState
with additional sub states
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.bsl.model.typesytem.VariableTreeTypeState
VariableTreeTypeState.CurrentNumTypesNumVisiting
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Environments,VariableTreeTypeState>
subStates
Provided sub states byEnvironments
-
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 VariableTreeTypeStateWithSubStates(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 List<VariableTreeTypeState>
getAllSubStates()
VariableTreeTypeState
getConcreteState(Environments envs)
Gets sub state for this state corresponding to theenvs
List<VariableTreeTypeState>
getSubStates(Environments envs)
Gets sub states for this state corresponding to theenvs
boolean
isEmptyState()
Checks that there is no sub statesprotected void
linkedState(VariableTreeTypeState parentState, VariableTreeTypeState childState)
Links state each other-
Methods inherited from class com._1c.g5.v8.dt.bsl.model.typesytem.ThreadSafeVariableTreeTypeState
addDependState, addExpression, addType, addTypes, addTypes, copyWithNewOffset, getDependStates, getExpressions, getTypes
-
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
-
-
-
-
Field Detail
-
subStates
protected Map<Environments,VariableTreeTypeState> subStates
Provided sub states byEnvironments
-
-
Constructor Detail
-
VariableTreeTypeStateWithSubStates
public VariableTreeTypeStateWithSubStates(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
-
getSubStates
public List<VariableTreeTypeState> getSubStates(Environments envs)
Gets sub states for this state corresponding to theenvs
- Parameters:
envs
-Environments
for filtering sub states, each sub state environments should be contains anyEnvironment
fromenvs
- Returns:
- list of filtering sub states, never
null
-
getAllSubStates
public List<VariableTreeTypeState> getAllSubStates()
-
getConcreteState
public VariableTreeTypeState getConcreteState(Environments envs)
Gets sub state for this state corresponding to theenvs
- Parameters:
envs
-Environments
for getting sub states, each sub state environments should be equals toenvs
.- Returns:
- sub state for this state corresponding to the
envs
, if there is no corresponding su states it will be created and parent state should be depend on creating, nevernull
-
isEmptyState
public boolean isEmptyState()
Checks that there is no sub states- Returns:
true
if there is no sub states,false
otherwise
-
linkedState
protected void linkedState(VariableTreeTypeState parentState, VariableTreeTypeState childState)
Links state each other- Parameters:
parentState
- parent state for added child state, cannot benull
childState
- child state is added to parent state, cannot benull
-
-