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) class
private 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) Options
private final MethodPrototype
(package private) final VariableFactory
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractLValueScopeDiscoverer
(Options options, MethodPrototype prototype, VariableFactory variableFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
collect
(StackSSALabel lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) void
collectMultiUse
(StackSSALabel lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) void
collectMutatedLValue
(LValue lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) private boolean
defineInsideSwitchContent
(LValue scopedEntity, List<AbstractLValueScopeDiscoverer.ScopeDefinition> definitions, List<StatementContainer<StructuredStatement>> commonScope) void
enterBlock
(StructuredStatement structuredStatement) private static <T> List<T>
getCommonPrefix
(List<T> a, List<T> b) (package private) ScopeDiscoverInfoCache
private StatementContainer<StructuredStatement>
getNonInit
(StatementContainer<StructuredStatement> creationContainer) private JavaTypeInstance
getUnclashedType
(InferredJavaType inferredJavaType) boolean
void
leaveBlock
(StructuredStatement structuredStatement) void
void
void
processOp04Statement
(Op04StructuredStatement statement) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.benf.cfr.reader.bytecode.analysis.parse.utils.scope.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:
enterBlock
in interfaceLValueScopeDiscoverer
-
ifCanDefine
public boolean ifCanDefine()- Specified by:
ifCanDefine
in interfaceLValueScopeDiscoverer
-
processOp04Statement
- Specified by:
processOp04Statement
in interfaceLValueScopeDiscoverer
-
mark
- Specified by:
mark
in interfaceLValueScopeDiscoverer
-
leaveBlock
- Specified by:
leaveBlock
in interfaceLValueScopeDiscoverer
-
collect
public void collect(StackSSALabel lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) - Specified by:
collect
in interfaceLValueAssignmentCollector<StructuredStatement>
- Specified by:
collect
in interfaceLValueScopeDiscoverer
-
collectMultiUse
public void collectMultiUse(StackSSALabel lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) - Specified by:
collectMultiUse
in interfaceLValueAssignmentCollector<StructuredStatement>
- Specified by:
collectMultiUse
in interfaceLValueScopeDiscoverer
-
collectMutatedLValue
public void collectMutatedLValue(LValue lValue, StatementContainer<StructuredStatement> statementContainer, Expression value) - Specified by:
collectMutatedLValue
in interfaceLValueAssignmentCollector<StructuredStatement>
- Specified by:
collectMutatedLValue
in 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
-