|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.internal.compiler.flow.FlowInfo
public abstract class FlowInfo
Field Summary | |
---|---|
static UnconditionalFlowInfo |
DEAD_END
|
static int |
NON_NULL
|
static int |
NULL
|
static int |
NULL_FLAG_MASK
|
static int |
POTENTIALLY_NON_NULL
|
static int |
POTENTIALLY_NULL
|
static int |
POTENTIALLY_UNKNOWN
|
static int |
REACHABLE
|
int |
tagBits
|
static int |
UNKNOWN
|
static int |
UNREACHABLE
|
static int |
UNREACHABLE_BY_NULLANALYSIS
|
static int |
UNREACHABLE_OR_DEAD
|
Constructor Summary | |
---|---|
FlowInfo()
|
Method Summary | |
---|---|
abstract FlowInfo |
addInitializationsFrom(FlowInfo otherInits)
Add other inits to this flow info, then return this. |
abstract FlowInfo |
addNullInfoFrom(FlowInfo otherInits)
Add all null information from otherInits to this flow info and return this. |
abstract FlowInfo |
addPotentialInitializationsFrom(FlowInfo otherInits)
Compose other inits over this flow info, then return this. |
FlowInfo |
asNegatedCondition()
|
boolean |
cannotBeDefinitelyNullOrNonNull(LocalVariableBinding local)
Check whether a given local variable is known to be unable to gain a definite non null or definite null status by the use of an enclosing flow info. |
boolean |
cannotBeNull(LocalVariableBinding local)
Check whether a given local variable is known to be non null, either because it is definitely non null, or because is has been tested against non null. |
boolean |
canOnlyBeNull(LocalVariableBinding local)
Check whether a given local variable is known to be null, either because it is definitely null, or because is has been tested against null. |
static FlowInfo |
conditional(FlowInfo initsWhenTrue,
FlowInfo initsWhenFalse)
|
abstract FlowInfo |
copy()
Return a deep copy of the current instance. |
static UnconditionalFlowInfo |
initial(int maxFieldCount)
|
abstract FlowInfo |
initsWhenFalse()
Return the flow info that would result from the path associated to the value false for the condition expression that generated this flow info. |
abstract FlowInfo |
initsWhenTrue()
Return the flow info that would result from the path associated to the value true for the condition expression that generated this flow info. |
abstract boolean |
isDefinitelyAssigned(FieldBinding field)
Check status of definite assignment for a field. |
abstract boolean |
isDefinitelyAssigned(LocalVariableBinding local)
Check status of definite assignment for a local. |
abstract boolean |
isDefinitelyNonNull(LocalVariableBinding local)
Check status of definite non-null value for a given local variable. |
abstract boolean |
isDefinitelyNull(LocalVariableBinding local)
Check status of definite null value for a given local variable. |
abstract boolean |
isDefinitelyUnknown(LocalVariableBinding local)
Check status of definite unknown value for a given local variable. |
abstract boolean |
isMarkedAsNullOrNonNullInAssertExpression(LocalVariableBinding local)
Returns true if the local variable being checked for was marked as null or not null inside an assert expression due to comparison against null. |
abstract boolean |
isPotentiallyAssigned(FieldBinding field)
Check status of potential assignment for a field. |
abstract boolean |
isPotentiallyAssigned(LocalVariableBinding field)
Check status of potential assignment for a local variable. |
abstract boolean |
isPotentiallyNonNull(LocalVariableBinding local)
Check status of potential null assignment for a local. |
abstract boolean |
isPotentiallyNull(LocalVariableBinding local)
Check status of potential null assignment for a local. |
abstract boolean |
isPotentiallyUnknown(LocalVariableBinding local)
Return true if the given local may have been assigned to an unknown value. |
abstract boolean |
isProtectedNonNull(LocalVariableBinding local)
Return true if the given local is protected by a test against a non null value. |
abstract boolean |
isProtectedNull(LocalVariableBinding local)
Return true if the given local is protected by a test against null. |
abstract void |
markAsComparedEqualToNonNull(LocalVariableBinding local)
Record that a local variable got checked to be non null. |
abstract void |
markAsComparedEqualToNull(LocalVariableBinding local)
Record that a local variable got checked to be null. |
abstract void |
markAsDefinitelyAssigned(FieldBinding field)
Record a field got definitely assigned. |
abstract void |
markAsDefinitelyAssigned(LocalVariableBinding local)
Record a local got definitely assigned. |
abstract void |
markAsDefinitelyNonNull(LocalVariableBinding local)
Record a local got definitely assigned to a non-null value. |
abstract void |
markAsDefinitelyNull(LocalVariableBinding local)
Record a local got definitely assigned to null. |
abstract void |
markAsDefinitelyUnknown(LocalVariableBinding local)
Record a local got definitely assigned to an unknown value. |
abstract void |
markedAsNullOrNonNullInAssertExpression(LocalVariableBinding local)
Tell the flowInfo that a local variable got marked as non null or null due to comparison with null inside an assert expression. |
void |
markNullStatus(LocalVariableBinding local,
int nullStatus)
Mark the null status of the given local according to the given status |
abstract void |
markPotentiallyNonNullBit(LocalVariableBinding local)
Record a local may have got assigned to non-null (set the bit on existing info). |
abstract void |
markPotentiallyNullBit(LocalVariableBinding local)
Record a local may have got assigned to null (set the bit on existing info). |
abstract void |
markPotentiallyUnknownBit(LocalVariableBinding local)
Record a local may have got assigned to unknown (set the bit on existing info). |
static UnconditionalFlowInfo |
mergedOptimizedBranches(FlowInfo initsWhenTrue,
boolean isOptimizedTrue,
FlowInfo initsWhenFalse,
boolean isOptimizedFalse,
boolean allowFakeDeadBranch)
Merge branches using optimized boolean conditions |
static UnconditionalFlowInfo |
mergedOptimizedBranchesIfElse(FlowInfo initsWhenTrue,
boolean isOptimizedTrue,
FlowInfo initsWhenFalse,
boolean isOptimizedFalse,
boolean allowFakeDeadBranch,
FlowInfo flowInfo,
IfStatement ifStatement)
Merge if-else branches using optimized boolean conditions |
abstract UnconditionalFlowInfo |
mergedWith(UnconditionalFlowInfo otherInits)
Return the intersection of this and otherInits, that is one of: the receiver updated in the following way: intersection of definitely assigned variables, union of potentially assigned variables, similar operations for null, or the receiver or otherInits if the other one is non reachable. otherInits is not affected, and is not returned either (no need to protect the result). |
abstract UnconditionalFlowInfo |
nullInfoLessUnconditionalCopy()
Return a copy of this unconditional flow info, deprived from its null info. |
int |
nullStatus(LocalVariableBinding local)
Answer the null status of the given local |
int |
reachMode()
Find out the reachability mode of this flowInfo. |
abstract void |
resetAssignmentInfo(LocalVariableBinding local)
Resets the definite and potential initialization info for the given local variable |
abstract void |
resetNullInfo(LocalVariableBinding local)
Reset all null-information about a given local. |
abstract FlowInfo |
safeInitsWhenTrue()
Return a flow info that carries the same information as the result of initsWhenTrue , but warrantied to be different
from this.Caveat: side effects on the result may affect components of this. |
abstract FlowInfo |
setReachMode(int reachMode)
Set this flow info reach mode and return this. |
String |
toString()
|
abstract UnconditionalFlowInfo |
unconditionalCopy()
Return a new flow info that holds the same information as this would after a call to unconditionalInits, but leaving this info unaffected. |
abstract UnconditionalFlowInfo |
unconditionalFieldLessCopy()
Return a new flow info that holds the same information as this would after a call to unconditionalInits followed by the
erasure of fields specific information, but leaving this flow info unaffected. |
abstract UnconditionalFlowInfo |
unconditionalInits()
Return a flow info that merges the possible paths of execution described by this flow info. |
abstract UnconditionalFlowInfo |
unconditionalInitsWithoutSideEffect()
Return a new flow info that holds the same information as this would after a call to unconditionalInits , but leaving
this info unaffected. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int tagBits
public static final int REACHABLE
public static final int UNREACHABLE_OR_DEAD
public static final int UNREACHABLE_BY_NULLANALYSIS
public static final int UNREACHABLE
public static final int NULL_FLAG_MASK
public static final int UNKNOWN
public static final int NULL
public static final int NON_NULL
public static final int POTENTIALLY_UNKNOWN
public static final int POTENTIALLY_NULL
public static final int POTENTIALLY_NON_NULL
public static final UnconditionalFlowInfo DEAD_END
Constructor Detail |
---|
public FlowInfo()
Method Detail |
---|
public abstract FlowInfo addInitializationsFrom(FlowInfo otherInits)
otherInits
- other inits to add to this
public abstract FlowInfo addNullInfoFrom(FlowInfo otherInits)
public abstract FlowInfo addPotentialInitializationsFrom(FlowInfo otherInits)
addInitializationsFrom
.
otherInits
- other inits to compose over this
public FlowInfo asNegatedCondition()
public static FlowInfo conditional(FlowInfo initsWhenTrue, FlowInfo initsWhenFalse)
public boolean cannotBeDefinitelyNullOrNonNull(LocalVariableBinding local)
local
- the variable to check
public boolean cannotBeNull(LocalVariableBinding local)
local
- the variable to ckeck
public boolean canOnlyBeNull(LocalVariableBinding local)
local
- the variable to ckeck
public abstract FlowInfo copy()
public static UnconditionalFlowInfo initial(int maxFieldCount)
public abstract FlowInfo initsWhenFalse()
ConditionalFlowInfo
. May have a side effect on subparts of this flow
info (subtrees get merged).
public abstract FlowInfo initsWhenTrue()
ConditionalFlowInfo
. May have a side effect on subparts of this flow
info (subtrees get merged).
public abstract boolean isDefinitelyAssigned(FieldBinding field)
public abstract boolean isDefinitelyAssigned(LocalVariableBinding local)
public abstract boolean isDefinitelyNonNull(LocalVariableBinding local)
local
- the variable to ckeck
public abstract boolean isDefinitelyNull(LocalVariableBinding local)
local
- the variable to ckeck
public abstract boolean isDefinitelyUnknown(LocalVariableBinding local)
local
- the variable to ckeck
public abstract boolean isPotentiallyAssigned(FieldBinding field)
public abstract boolean isPotentiallyAssigned(LocalVariableBinding field)
public abstract boolean isPotentiallyNonNull(LocalVariableBinding local)
local
- LocalVariableBinding - the binding for the checked local
public abstract boolean isPotentiallyNull(LocalVariableBinding local)
local
- LocalVariableBinding - the binding for the checked local
public abstract boolean isPotentiallyUnknown(LocalVariableBinding local)
local
- the local to check
public abstract boolean isProtectedNonNull(LocalVariableBinding local)
local
- the local to check
public abstract boolean isProtectedNull(LocalVariableBinding local)
local
- the local to check
public abstract void markAsComparedEqualToNonNull(LocalVariableBinding local)
local
- the checked local variablepublic abstract void markAsComparedEqualToNull(LocalVariableBinding local)
local
- the checked local variablepublic abstract void markAsDefinitelyAssigned(FieldBinding field)
public abstract void markAsDefinitelyNonNull(LocalVariableBinding local)
public abstract void markAsDefinitelyNull(LocalVariableBinding local)
public abstract void resetNullInfo(LocalVariableBinding local)
public abstract void markPotentiallyUnknownBit(LocalVariableBinding local)
public abstract void markPotentiallyNullBit(LocalVariableBinding local)
public abstract void markPotentiallyNonNullBit(LocalVariableBinding local)
public abstract void markAsDefinitelyAssigned(LocalVariableBinding local)
public abstract void markAsDefinitelyUnknown(LocalVariableBinding local)
public void markNullStatus(LocalVariableBinding local, int nullStatus)
local
- nullStatus
- bitset of FLowInfo.UNKNOWN ... FlowInfo.POTENTIALLY_NON_NULLpublic int nullStatus(LocalVariableBinding local)
local
-
public static UnconditionalFlowInfo mergedOptimizedBranches(FlowInfo initsWhenTrue, boolean isOptimizedTrue, FlowInfo initsWhenFalse, boolean isOptimizedFalse, boolean allowFakeDeadBranch)
public static UnconditionalFlowInfo mergedOptimizedBranchesIfElse(FlowInfo initsWhenTrue, boolean isOptimizedTrue, FlowInfo initsWhenFalse, boolean isOptimizedFalse, boolean allowFakeDeadBranch, FlowInfo flowInfo, IfStatement ifStatement)
public int reachMode()
public abstract FlowInfo safeInitsWhenTrue()
initsWhenTrue
, but warrantied to be different
from this.
public abstract FlowInfo setReachMode(int reachMode)
reachMode
- one of REACHABLE
, UNREACHABLE_OR_DEAD
,
UNREACHABLE_BY_NULLANALYSIS
or UNREACHABLE
public abstract UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits)
otherInits
- the flow info to merge with this
public abstract UnconditionalFlowInfo nullInfoLessUnconditionalCopy()
DEAD_END
is returned unmodified.
public String toString()
toString
in class Object
public abstract UnconditionalFlowInfo unconditionalCopy()
public abstract UnconditionalFlowInfo unconditionalFieldLessCopy()
unconditionalInits
followed by the
erasure of fields specific information, but leaving this flow info unaffected.
public abstract UnconditionalFlowInfo unconditionalInits()
public abstract UnconditionalFlowInfo unconditionalInitsWithoutSideEffect()
unconditionalInits
, but leaving
this info unaffected. Side effects on the result might affect this though
(consider it as read only).
public abstract void markedAsNullOrNonNullInAssertExpression(LocalVariableBinding local)
public abstract boolean isMarkedAsNullOrNonNullInAssertExpression(LocalVariableBinding local)
public abstract void resetAssignmentInfo(LocalVariableBinding local)
local
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |