|
||||||||||
| 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
org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo
public class UnconditionalFlowInfo
Record initialization status during definite assignment analysis No caching of pre-allocated instances.
| Nested Class Summary | |
|---|---|
static class |
UnconditionalFlowInfo.AssertionFailedException
Exception raised when unexpected behavior is detected during coverage tests. |
| Field Summary | |
|---|---|
static int |
BitCacheSize
|
static boolean |
coverageTestFlag
|
static int |
coverageTestId
|
long |
definiteInits
|
long[][] |
extra
|
static int |
extraLength
|
int |
maxFieldCount
|
long |
nullBit1
|
long |
nullBit2
|
long |
nullBit3
|
long |
nullBit4
|
long |
potentialInits
|
| Fields inherited from class org.eclipse.jdt.internal.compiler.flow.FlowInfo |
|---|
DEAD_END, NON_NULL, NULL, NULL_FLAG_MASK, REACHABLE, tagBits, UNKNOWN, UNREACHABLE |
| Constructor Summary | |
|---|---|
UnconditionalFlowInfo()
|
|
| Method Summary | |
|---|---|
FlowInfo |
addInitializationsFrom(FlowInfo inits)
Add other inits to this flow info, then return this. |
FlowInfo |
addPotentialInitializationsFrom(FlowInfo inits)
Compose other inits over this flow info, then return this. |
UnconditionalFlowInfo |
addPotentialNullInfoFrom(UnconditionalFlowInfo otherInits)
Compose other inits over this flow info, then return this. |
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. |
FlowInfo |
copy()
Return a deep copy of the current instance. |
UnconditionalFlowInfo |
discardInitializationInfo()
Discard definite inits and potential inits from this, then return this. |
UnconditionalFlowInfo |
discardNonFieldInitializations()
Remove local variables information from this flow info and return this. |
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. |
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. |
boolean |
isDefinitelyAssigned(FieldBinding field)
Check status of definite assignment for a field. |
boolean |
isDefinitelyAssigned(LocalVariableBinding local)
Check status of definite assignment for a local. |
boolean |
isDefinitelyNonNull(LocalVariableBinding local)
Check status of definite non-null value for a given local variable. |
boolean |
isDefinitelyNull(LocalVariableBinding local)
Check status of definite null value for a given local variable. |
boolean |
isDefinitelyUnknown(LocalVariableBinding local)
Check status of definite unknown value for a given local variable. |
boolean |
isPotentiallyAssigned(FieldBinding field)
Check status of potential assignment for a field. |
boolean |
isPotentiallyAssigned(LocalVariableBinding local)
Check status of potential assignment for a local variable. |
boolean |
isPotentiallyNonNull(LocalVariableBinding local)
Check status of potential null assignment for a local. |
boolean |
isPotentiallyNull(LocalVariableBinding local)
Check status of potential null assignment for a local. |
boolean |
isPotentiallyUnknown(LocalVariableBinding local)
Return true if the given local may have been assigned to an unknown value. |
boolean |
isProtectedNonNull(LocalVariableBinding local)
Return true if the given local is protected by a test against a non null value. |
boolean |
isProtectedNull(LocalVariableBinding local)
Return true if the given local is protected by a test against null. |
void |
markAsComparedEqualToNonNull(LocalVariableBinding local)
Record that a local variable got checked to be non null. |
void |
markAsComparedEqualToNull(LocalVariableBinding local)
Record that a local variable got checked to be null. |
void |
markAsDefinitelyAssigned(FieldBinding field)
Record a field got definitely assigned. |
void |
markAsDefinitelyAssigned(LocalVariableBinding local)
Record a local got definitely assigned. |
void |
markAsDefinitelyNonNull(LocalVariableBinding local)
Record a local got definitely assigned to a non-null value. |
void |
markAsDefinitelyNull(LocalVariableBinding local)
Record a local got definitely assigned to null. |
void |
markAsDefinitelyUnknown(LocalVariableBinding local)
Mark a local as having been assigned to an unknown value. |
void |
markAsPotentiallyNull(LocalVariableBinding local)
Record a local got definitely assigned to a possibly null value. |
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). |
UnconditionalFlowInfo |
nullInfoLessUnconditionalCopy()
Return a copy of this unconditional flow info, deprived from its null info. |
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. |
FlowInfo |
setReachMode(int reachMode)
Set this flow info reach mode and return this. |
java.lang.String |
toString()
|
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. |
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. |
UnconditionalFlowInfo |
unconditionalInits()
Return a flow info that merges the possible paths of execution described by this flow info. |
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 org.eclipse.jdt.internal.compiler.flow.FlowInfo |
|---|
asNegatedCondition, conditional, initial, mergedOptimizedBranches, reachMode |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final boolean coverageTestFlag
public static int coverageTestId
public long definiteInits
public long potentialInits
public long nullBit1
public long nullBit2
public long nullBit3
public long nullBit4
public static final int extraLength
public long[][] extra
public int maxFieldCount
public static final int BitCacheSize
| Constructor Detail |
|---|
public UnconditionalFlowInfo()
| Method Detail |
|---|
public FlowInfo addInitializationsFrom(FlowInfo inits)
FlowInfo
addInitializationsFrom in class FlowInfoinits - other inits to add to this
public FlowInfo addPotentialInitializationsFrom(FlowInfo inits)
FlowInfoaddInitializationsFrom.
addPotentialInitializationsFrom in class FlowInfoinits - other inits to compose over this
public UnconditionalFlowInfo addPotentialNullInfoFrom(UnconditionalFlowInfo otherInits)
addInitializationsFrom; moreover,
only the null information is affected.
otherInits - other null inits to compose over this
public final boolean cannotBeDefinitelyNullOrNonNull(LocalVariableBinding local)
FlowInfo
cannotBeDefinitelyNullOrNonNull in class FlowInfolocal - the variable to ckeck
public final boolean cannotBeNull(LocalVariableBinding local)
FlowInfo
cannotBeNull in class FlowInfolocal - the variable to ckeck
public final boolean canOnlyBeNull(LocalVariableBinding local)
FlowInfo
canOnlyBeNull in class FlowInfolocal - the variable to ckeck
public FlowInfo copy()
FlowInfo
copy in class FlowInfopublic UnconditionalFlowInfo discardInitializationInfo()
public UnconditionalFlowInfo discardNonFieldInitializations()
public FlowInfo initsWhenFalse()
FlowInfoConditionalFlowInfo. May have a side effect on subparts of this flow
info (subtrees get merged).
initsWhenFalse in class FlowInfopublic FlowInfo initsWhenTrue()
FlowInfoConditionalFlowInfo. May have a side effect on subparts of this flow
info (subtrees get merged).
initsWhenTrue in class FlowInfopublic final boolean isDefinitelyAssigned(FieldBinding field)
FlowInfo
isDefinitelyAssigned in class FlowInfopublic final boolean isDefinitelyAssigned(LocalVariableBinding local)
FlowInfo
isDefinitelyAssigned in class FlowInfopublic final boolean isDefinitelyNonNull(LocalVariableBinding local)
FlowInfo
isDefinitelyNonNull in class FlowInfolocal - the variable to ckeck
public final boolean isDefinitelyNull(LocalVariableBinding local)
FlowInfo
isDefinitelyNull in class FlowInfolocal - the variable to ckeck
public final boolean isDefinitelyUnknown(LocalVariableBinding local)
FlowInfo
isDefinitelyUnknown in class FlowInfolocal - the variable to ckeck
public final boolean isPotentiallyAssigned(FieldBinding field)
FlowInfo
isPotentiallyAssigned in class FlowInfopublic final boolean isPotentiallyAssigned(LocalVariableBinding local)
FlowInfo
isPotentiallyAssigned in class FlowInfopublic final boolean isPotentiallyNonNull(LocalVariableBinding local)
FlowInfo
isPotentiallyNonNull in class FlowInfolocal - LocalVariableBinding - the binding for the checked local
public final boolean isPotentiallyNull(LocalVariableBinding local)
FlowInfo
isPotentiallyNull in class FlowInfolocal - LocalVariableBinding - the binding for the checked local
public final boolean isPotentiallyUnknown(LocalVariableBinding local)
FlowInfo
isPotentiallyUnknown in class FlowInfolocal - the local to check
public final boolean isProtectedNonNull(LocalVariableBinding local)
FlowInfo
isProtectedNonNull in class FlowInfolocal - the local to check
public final boolean isProtectedNull(LocalVariableBinding local)
FlowInfo
isProtectedNull in class FlowInfolocal - the local to check
public void markAsComparedEqualToNonNull(LocalVariableBinding local)
FlowInfo
markAsComparedEqualToNonNull in class FlowInfolocal - the checked local variablepublic void markAsComparedEqualToNull(LocalVariableBinding local)
FlowInfo
markAsComparedEqualToNull in class FlowInfolocal - the checked local variablepublic void markAsDefinitelyAssigned(FieldBinding field)
FlowInfo
markAsDefinitelyAssigned in class FlowInfopublic void markAsDefinitelyAssigned(LocalVariableBinding local)
FlowInfo
markAsDefinitelyAssigned in class FlowInfopublic void markAsDefinitelyNonNull(LocalVariableBinding local)
FlowInfo
markAsDefinitelyNonNull in class FlowInfopublic void markAsDefinitelyNull(LocalVariableBinding local)
FlowInfo
markAsDefinitelyNull in class FlowInfopublic void markAsDefinitelyUnknown(LocalVariableBinding local)
markAsDefinitelyUnknown in class FlowInfolocal - the local to markpublic UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits)
FlowInfo
mergedWith in class FlowInfootherInits - the flow info to merge with this
public UnconditionalFlowInfo nullInfoLessUnconditionalCopy()
FlowInfoDEAD_END is returned unmodified.
nullInfoLessUnconditionalCopy in class FlowInfopublic FlowInfo safeInitsWhenTrue()
FlowInfoinitsWhenTrue, but warrantied to be different
from this.
safeInitsWhenTrue in class FlowInfopublic FlowInfo setReachMode(int reachMode)
FlowInfo
setReachMode in class FlowInforeachMode - one of REACHABLE or UNREACHABLE
public java.lang.String toString()
toString in class FlowInfopublic UnconditionalFlowInfo unconditionalCopy()
FlowInfo
unconditionalCopy in class FlowInfopublic UnconditionalFlowInfo unconditionalFieldLessCopy()
FlowInfounconditionalInits followed by the
erasure of fields specific information, but leaving this flow info unaffected.
unconditionalFieldLessCopy in class FlowInfopublic UnconditionalFlowInfo unconditionalInits()
FlowInfo
unconditionalInits in class FlowInfopublic UnconditionalFlowInfo unconditionalInitsWithoutSideEffect()
FlowInfounconditionalInits, but leaving
this info unaffected. Side effects on the result might affect this though
(consider it as read only).
unconditionalInitsWithoutSideEffect in class FlowInfopublic void markAsPotentiallyNull(LocalVariableBinding local)
FlowInfo
markAsPotentiallyNull in class FlowInfo
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||