Class AbstractLValueScopeDiscoverer
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.parse.utils.scope.AbstractLValueScopeDiscoverer
- All Implemented Interfaces:
LValueAssignmentCollector<StructuredStatement>, LValueUsageCollector, LValueScopeDiscoverer
- Direct Known Subclasses:
LocalClassScopeDiscoverImpl, LValueScopeDiscoverImpl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) Stack<StatementContainer<StructuredStatement>> (package private) int(package private) StatementContainer<StructuredStatement> (package private) final List<AbstractLValueScopeDiscoverer.ScopeDefinition> (package private) final Map<NamedVariable, AbstractLValueScopeDiscoverer.ScopeDefinition> (package private) final Map<Integer, Map<NamedVariable, Boolean>> private final ScopeDiscoverInfoCache(package private) Optionsprivate final MethodPrototype(package private) final VariableFactory -
Constructor Summary
ConstructorsConstructorDescriptionAbstractLValueScopeDiscoverer(Options options, MethodPrototype prototype, VariableFactory variableFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidcollect(StackSSALabel lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) voidcollectMultiUse(StackSSALabel lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) voidcollectMutatedLValue(LValue lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) private booleandefineInsideSwitchContent(LValue scopedEntity, List<AbstractLValueScopeDiscoverer.ScopeDefinition> definitions, List<StatementContainer<StructuredStatement>> commonScope) voidenterBlock(StructuredStatement structuredStatement) private static <T> List<T> getCommonPrefix(List<T> a, List<T> b) (package private) ScopeDiscoverInfoCacheprivate StatementContainer<StructuredStatement> getNonInit(StatementContainer<StructuredStatement> creationContainer) private JavaTypeInstancegetUnclashedType(InferredJavaType inferredJavaType) booleanvoidleaveBlock(StructuredStatement structuredStatement) voidvoidvoidprocessOp04Statement(Op04StructuredStatement statement) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LValueScopeDiscoverer
collect, collectLocalVariableAssignment, descendLambdas
-
Field Details
-
earliestDefinition
-
earliestDefinitionsByLevel
-
currentDepth
int currentDepth -
currentBlock
Stack<StatementContainer<StructuredStatement>> currentBlock -
discoveredCreations
-
variableFactory
-
currentMark
StatementContainer<StructuredStatement> currentMark -
options
Options options -
prototype
-
factCache
-
-
Constructor Details
-
AbstractLValueScopeDiscoverer
AbstractLValueScopeDiscoverer(Options options, MethodPrototype prototype, VariableFactory variableFactory)
-
-
Method Details
-
getFactCache
ScopeDiscoverInfoCache getFactCache() -
enterBlock
- Specified by:
enterBlockin interfaceLValueScopeDiscoverer
-
ifCanDefine
public boolean ifCanDefine()- Specified by:
ifCanDefinein interfaceLValueScopeDiscoverer
-
processOp04Statement
- Specified by:
processOp04Statementin interfaceLValueScopeDiscoverer
-
mark
- Specified by:
markin interfaceLValueScopeDiscoverer
-
leaveBlock
- Specified by:
leaveBlockin interfaceLValueScopeDiscoverer
-
collect
public void collect(StackSSALabel lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) - Specified by:
collectin interfaceLValueAssignmentCollector<StructuredStatement>- Specified by:
collectin interfaceLValueScopeDiscoverer
-
collectMultiUse
public void collectMultiUse(StackSSALabel lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) - Specified by:
collectMultiUsein interfaceLValueAssignmentCollector<StructuredStatement>- Specified by:
collectMultiUsein interfaceLValueScopeDiscoverer
-
collectMutatedLValue
public void collectMutatedLValue(LValue lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) - Specified by:
collectMutatedLValuein interfaceLValueAssignmentCollector<StructuredStatement>- Specified by:
collectMutatedLValuein interfaceLValueScopeDiscoverer
-
markDiscoveredCreations
public void markDiscoveredCreations() -
getNonInit
private StatementContainer<StructuredStatement> getNonInit(StatementContainer<StructuredStatement> creationContainer) -
defineInsideSwitchContent
private boolean defineInsideSwitchContent(LValue scopedEntity, List<AbstractLValueScopeDiscoverer.ScopeDefinition> definitions, List<StatementContainer<StructuredStatement>> commonScope) -
getCommonPrefix
-
getUnclashedType
-