org.eclipse.jdt.internal.compiler.flow
类 UnconditionalFlowInfo

java.lang.Object
  继承者 org.eclipse.jdt.internal.compiler.flow.FlowInfo
      继承者 org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo
直接已知子类:
NullInfoRegistry

public class UnconditionalFlowInfo
extends FlowInfo

Record initialization status during definite assignment analysis No caching of pre-allocated instances.


嵌套类摘要
static class UnconditionalFlowInfo.AssertionFailedException
          Exception raised when unexpected behavior is detected.
 
字段摘要
static int BitCacheSize
           
static boolean COVERAGE_TEST_FLAG
           
static int CoverageTestId
           
 long definiteInits
           
 long[][] extra
           
static int extraLength
           
 int maxFieldCount
           
 long nullBit1
           
 long nullBit2
           
 long nullBit3
           
 long nullBit4
           
 int[] nullStatusChangedInAssert
           
 long potentialInits
           
 
从类 org.eclipse.jdt.internal.compiler.flow.FlowInfo 继承的字段
DEAD_END, NON_NULL, NULL, NULL_FLAG_MASK, POTENTIALLY_NON_NULL, POTENTIALLY_NULL, POTENTIALLY_UNKNOWN, REACHABLE, tagBits, UNKNOWN, UNREACHABLE, UNREACHABLE_BY_NULLANALYSIS, UNREACHABLE_OR_DEAD
 
构造方法摘要
UnconditionalFlowInfo()
           
 
方法摘要
 FlowInfo addInitializationsFrom(FlowInfo inits)
          Add other inits to this flow info, then return this.
 FlowInfo addNullInfoFrom(FlowInfo inits)
          Add all null information from otherInits to this flow info and 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 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.
 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.
protected static boolean isTrue(boolean expression, String message)
          Asserts that the given boolean is true.
 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 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 markPotentiallyNonNullBit(LocalVariableBinding local)
          Record a local may have got assigned to non-null (set the bit on existing info).
 void markPotentiallyNullBit(LocalVariableBinding local)
          Record a local may have got assigned to null (set the bit on existing info).
 void markPotentiallyUnknownBit(LocalVariableBinding local)
          Mark a local as potentially having been assigned to an unknown 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.
 UnconditionalFlowInfo nullInfoLessUnconditionalCopy()
          Return a copy of this unconditional flow info, deprived from its null info.
 void resetNullInfo(LocalVariableBinding local)
          Reset all null-information about a given local.
 FlowInfo safeInitsWhenTrue()
          Return a flow info that carries the same information as the result of initsWhenTrue, but warrantied to be different from this.
 FlowInfo setReachMode(int reachMode)
          Set this flow info reach mode and return this.
 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.
 
从类 org.eclipse.jdt.internal.compiler.flow.FlowInfo 继承的方法
asNegatedCondition, conditional, initial, markNullStatus, mergedOptimizedBranches, mergedOptimizedBranchesIfElse, nullStatus, reachMode
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

COVERAGE_TEST_FLAG

public static final boolean COVERAGE_TEST_FLAG
另请参见:
常量字段值

CoverageTestId

public static int CoverageTestId

definiteInits

public long definiteInits

potentialInits

public long potentialInits

nullBit1

public long nullBit1

nullBit2

public long nullBit2

nullBit3

public long nullBit3

nullBit4

public long nullBit4

extraLength

public static final int extraLength
另请参见:
常量字段值

extra

public long[][] extra

maxFieldCount

public int maxFieldCount

BitCacheSize

public static final int BitCacheSize
另请参见:
常量字段值

nullStatusChangedInAssert

public int[] nullStatusChangedInAssert
构造方法详细信息

UnconditionalFlowInfo

public UnconditionalFlowInfo()
方法详细信息

addInitializationsFrom

public FlowInfo addInitializationsFrom(FlowInfo inits)
从类 FlowInfo 复制的描述
Add other inits to this flow info, then return this. The operation semantics are to match as closely as possible the application to this flow info of all the operations that resulted into otherInits.

指定者:
FlowInfo 中的 addInitializationsFrom
参数:
inits - other inits to add to this
返回:
this, modified according to otherInits information

addNullInfoFrom

public FlowInfo addNullInfoFrom(FlowInfo inits)
从类 FlowInfo 复制的描述
Add all null information from otherInits to this flow info and return this. The operation models the effect of an unconditional sequence of this flow info and otherInits.

指定者:
FlowInfo 中的 addNullInfoFrom

addPotentialInitializationsFrom

public FlowInfo addPotentialInitializationsFrom(FlowInfo inits)
从类 FlowInfo 复制的描述
Compose other inits over this flow info, then return this. The operation semantics are to wave into this flow info the consequences of a possible path into the operations that resulted into otherInits. The fact that this path may be left unexecuted under peculiar conditions results into less specific results than addInitializationsFrom.

指定者:
FlowInfo 中的 addPotentialInitializationsFrom
参数:
inits - other inits to compose over this
返回:
this, modified according to otherInits information

addPotentialNullInfoFrom

public UnconditionalFlowInfo addPotentialNullInfoFrom(UnconditionalFlowInfo otherInits)
Compose other inits over this flow info, then return this. The operation semantics are to wave into this flow info the consequences upon null information of a possible path into the operations that resulted into otherInits. The fact that this path may be left unexecuted under peculiar conditions results into less specific results than addInitializationsFrom; moreover, only the null information is affected.

参数:
otherInits - other null inits to compose over this
返回:
this, modified according to otherInits information

cannotBeDefinitelyNullOrNonNull

public final boolean cannotBeDefinitelyNullOrNonNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
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. The semantics are that if the current flow info marks the variable as potentially unknown or else as being both potentially null and potentially non null, then it won't ever be promoted as definitely null or definitely non null. (It could still get promoted to definite unknown).

覆盖:
FlowInfo 中的 cannotBeDefinitelyNullOrNonNull
参数:
local - the variable to check
返回:
true iff this flow info prevents local from being promoted to definite non null or definite null against an enclosing flow info

cannotBeNull

public final boolean cannotBeNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
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.

覆盖:
FlowInfo 中的 cannotBeNull
参数:
local - the variable to ckeck
返回:
true iff local cannot be null for this flow info

canOnlyBeNull

public final boolean canOnlyBeNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
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 中的 canOnlyBeNull
参数:
local - the variable to ckeck
返回:
true iff local can only be null for this flow info

copy

public FlowInfo copy()
从类 FlowInfo 复制的描述
Return a deep copy of the current instance.

指定者:
FlowInfo 中的 copy
返回:
a deep copy of this flow info

discardInitializationInfo

public UnconditionalFlowInfo discardInitializationInfo()
Discard definite inits and potential inits from this, then return this. The returned flow info only holds null related information.

返回:
this flow info, minus definite inits and potential inits

discardNonFieldInitializations

public UnconditionalFlowInfo discardNonFieldInitializations()
Remove local variables information from this flow info and return this.

返回:
this, deprived from any local variable information

initsWhenFalse

public FlowInfo initsWhenFalse()
从类 FlowInfo 复制的描述
Return the flow info that would result from the path associated to the value false for the condition expression that generated this flow info. May be this flow info if it is not an instance of ConditionalFlowInfo. May have a side effect on subparts of this flow info (subtrees get merged).

指定者:
FlowInfo 中的 initsWhenFalse
返回:
the flow info associated to the false branch of the condition that generated this flow info

initsWhenTrue

public FlowInfo initsWhenTrue()
从类 FlowInfo 复制的描述
Return the flow info that would result from the path associated to the value true for the condition expression that generated this flow info. May be this flow info if it is not an instance of ConditionalFlowInfo. May have a side effect on subparts of this flow info (subtrees get merged).

指定者:
FlowInfo 中的 initsWhenTrue
返回:
the flow info associated to the true branch of the condition that generated this flow info

isDefinitelyAssigned

public final boolean isDefinitelyAssigned(FieldBinding field)
从类 FlowInfo 复制的描述
Check status of definite assignment for a field.

指定者:
FlowInfo 中的 isDefinitelyAssigned

isDefinitelyAssigned

public final boolean isDefinitelyAssigned(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Check status of definite assignment for a local.

指定者:
FlowInfo 中的 isDefinitelyAssigned

isDefinitelyNonNull

public final boolean isDefinitelyNonNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Check status of definite non-null value for a given local variable.

指定者:
FlowInfo 中的 isDefinitelyNonNull
参数:
local - the variable to ckeck
返回:
true iff local is definitely non null for this flow info

isDefinitelyNull

public final boolean isDefinitelyNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Check status of definite null value for a given local variable.

指定者:
FlowInfo 中的 isDefinitelyNull
参数:
local - the variable to ckeck
返回:
true iff local is definitely null for this flow info

isDefinitelyUnknown

public final boolean isDefinitelyUnknown(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Check status of definite unknown value for a given local variable.

指定者:
FlowInfo 中的 isDefinitelyUnknown
参数:
local - the variable to ckeck
返回:
true iff local is definitely unknown for this flow info

isPotentiallyAssigned

public final boolean isPotentiallyAssigned(FieldBinding field)
从类 FlowInfo 复制的描述
Check status of potential assignment for a field.

指定者:
FlowInfo 中的 isPotentiallyAssigned

isPotentiallyAssigned

public final boolean isPotentiallyAssigned(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Check status of potential assignment for a local variable.

指定者:
FlowInfo 中的 isPotentiallyAssigned

isPotentiallyNonNull

public final boolean isPotentiallyNonNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Check status of potential null assignment for a local. Return true if there is a reasonable expectation that the variable be non null at this point.

指定者:
FlowInfo 中的 isPotentiallyNonNull
参数:
local - LocalVariableBinding - the binding for the checked local
返回:
true if there is a reasonable expectation that local be non null at this point

isPotentiallyNull

public final boolean isPotentiallyNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Check status of potential null assignment for a local. Return true if there is a reasonable expectation that the variable be null at this point. This includes the protected null case, so as to augment diagnostics, but does not really check that someone deliberately assigned to null on any specific path

指定者:
FlowInfo 中的 isPotentiallyNull
参数:
local - LocalVariableBinding - the binding for the checked local
返回:
true if there is a reasonable expectation that local be null at this point

isPotentiallyUnknown

public final boolean isPotentiallyUnknown(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Return true if the given local may have been assigned to an unknown value.

指定者:
FlowInfo 中的 isPotentiallyUnknown
参数:
local - the local to check
返回:
true if the given local may have been assigned to an unknown value

isProtectedNonNull

public final boolean isProtectedNonNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Return true if the given local is protected by a test against a non null value.

指定者:
FlowInfo 中的 isProtectedNonNull
参数:
local - the local to check
返回:
true if the given local is protected by a test against a non null

isProtectedNull

public final boolean isProtectedNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Return true if the given local is protected by a test against null.

指定者:
FlowInfo 中的 isProtectedNull
参数:
local - the local to check
返回:
true if the given local is protected by a test against null

isTrue

protected static boolean isTrue(boolean expression,
                                String message)
Asserts that the given boolean is true. If this is not the case, some kind of unchecked exception is thrown. The given message is included in that exception, to aid debugging.

参数:
expression - the outcome of the check
message - the message to include in the exception
返回:
true if the check passes (does not return if the check fails)

markAsComparedEqualToNonNull

public void markAsComparedEqualToNonNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Record that a local variable got checked to be non null.

指定者:
FlowInfo 中的 markAsComparedEqualToNonNull
参数:
local - the checked local variable

markAsComparedEqualToNull

public void markAsComparedEqualToNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Record that a local variable got checked to be null.

指定者:
FlowInfo 中的 markAsComparedEqualToNull
参数:
local - the checked local variable

markAsDefinitelyAssigned

public void markAsDefinitelyAssigned(FieldBinding field)
从类 FlowInfo 复制的描述
Record a field got definitely assigned.

指定者:
FlowInfo 中的 markAsDefinitelyAssigned

markAsDefinitelyAssigned

public void markAsDefinitelyAssigned(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Record a local got definitely assigned.

指定者:
FlowInfo 中的 markAsDefinitelyAssigned

markAsDefinitelyNonNull

public void markAsDefinitelyNonNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Record a local got definitely assigned to a non-null value.

指定者:
FlowInfo 中的 markAsDefinitelyNonNull

markAsDefinitelyNull

public void markAsDefinitelyNull(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Record a local got definitely assigned to null.

指定者:
FlowInfo 中的 markAsDefinitelyNull

markAsDefinitelyUnknown

public void markAsDefinitelyUnknown(LocalVariableBinding local)
Mark a local as having been assigned to an unknown value.

指定者:
FlowInfo 中的 markAsDefinitelyUnknown
参数:
local - the local to mark

resetNullInfo

public void resetNullInfo(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Reset all null-information about a given local.

指定者:
FlowInfo 中的 resetNullInfo

markPotentiallyUnknownBit

public void markPotentiallyUnknownBit(LocalVariableBinding local)
Mark a local as potentially having been assigned to an unknown value.

指定者:
FlowInfo 中的 markPotentiallyUnknownBit
参数:
local - the local to mark

markPotentiallyNullBit

public void markPotentiallyNullBit(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Record a local may have got assigned to null (set the bit on existing info).

指定者:
FlowInfo 中的 markPotentiallyNullBit

markPotentiallyNonNullBit

public void markPotentiallyNonNullBit(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Record a local may have got assigned to non-null (set the bit on existing info).

指定者:
FlowInfo 中的 markPotentiallyNonNullBit

mergedWith

public UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits)
从类 FlowInfo 复制的描述
Return the intersection of this and otherInits, that is one of: otherInits is not affected, and is not returned either (no need to protect the result).

指定者:
FlowInfo 中的 mergedWith
参数:
otherInits - the flow info to merge with this
返回:
the intersection of this and otherInits.

nullInfoLessUnconditionalCopy

public UnconditionalFlowInfo nullInfoLessUnconditionalCopy()
从类 FlowInfo 复制的描述
Return a copy of this unconditional flow info, deprived from its null info. DEAD_END is returned unmodified.

指定者:
FlowInfo 中的 nullInfoLessUnconditionalCopy
返回:
a copy of this unconditional flow info deprived from its null info

safeInitsWhenTrue

public FlowInfo safeInitsWhenTrue()
从类 FlowInfo 复制的描述
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 中的 safeInitsWhenTrue
返回:
the result of initsWhenTrue or a copy of it

setReachMode

public FlowInfo setReachMode(int reachMode)
从类 FlowInfo 复制的描述
Set this flow info reach mode and return this.

指定者:
FlowInfo 中的 setReachMode
参数:
reachMode - one of REACHABLE, UNREACHABLE_OR_DEAD, UNREACHABLE_BY_NULLANALYSIS or UNREACHABLE
返回:
this, with the reach mode set to reachMode

toString

public String toString()
覆盖:
FlowInfo 中的 toString

unconditionalCopy

public UnconditionalFlowInfo unconditionalCopy()
从类 FlowInfo 复制的描述
Return a new flow info that holds the same information as this would after a call to unconditionalInits, but leaving this info unaffected. Moreover, the result can be modified without affecting this.

指定者:
FlowInfo 中的 unconditionalCopy
返回:
a new flow info carrying this unconditional flow info

unconditionalFieldLessCopy

public UnconditionalFlowInfo unconditionalFieldLessCopy()
从类 FlowInfo 复制的描述
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.

指定者:
FlowInfo 中的 unconditionalFieldLessCopy
返回:
a new flow info carrying the unconditional flow info for local variables

unconditionalInits

public UnconditionalFlowInfo unconditionalInits()
从类 FlowInfo 复制的描述
Return a flow info that merges the possible paths of execution described by this flow info. In case of an unconditional flow info, return this. In case of a conditional flow info, merge branches recursively. Caveat: this may be affected, and modifying the result may affect this.

指定者:
FlowInfo 中的 unconditionalInits
返回:
a flow info that merges the possible paths of execution described by this

unconditionalInitsWithoutSideEffect

public UnconditionalFlowInfo unconditionalInitsWithoutSideEffect()
从类 FlowInfo 复制的描述
Return a new flow info that holds the same information as this would after a call to unconditionalInits, but leaving this info unaffected. Side effects on the result might affect this though (consider it as read only).

指定者:
FlowInfo 中的 unconditionalInitsWithoutSideEffect
返回:
a flow info carrying this unconditional flow info

markedAsNullOrNonNullInAssertExpression

public void markedAsNullOrNonNullInAssertExpression(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Tell the flowInfo that a local variable got marked as non null or null due to comparison with null inside an assert expression. This is to prevent over-aggressive code generation for subsequent if statements where this variable is being checked against null

指定者:
FlowInfo 中的 markedAsNullOrNonNullInAssertExpression

isMarkedAsNullOrNonNullInAssertExpression

public boolean isMarkedAsNullOrNonNullInAssertExpression(LocalVariableBinding local)
从类 FlowInfo 复制的描述
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.

指定者:
FlowInfo 中的 isMarkedAsNullOrNonNullInAssertExpression


Copyright © 2013. All Rights Reserved.