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

java.lang.Object
  继承者 org.eclipse.jdt.internal.compiler.flow.FlowInfo
      继承者 org.eclipse.jdt.internal.compiler.flow.ConditionalFlowInfo

public class ConditionalFlowInfo
extends FlowInfo

Record conditional initialization status during definite assignment analysis


字段摘要
 FlowInfo initsWhenFalse
           
 FlowInfo initsWhenTrue
           
 
从类 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
 
方法摘要
 FlowInfo addInitializationsFrom(FlowInfo otherInits)
          Add other inits to this flow info, then return this.
 FlowInfo addNullInfoFrom(FlowInfo otherInits)
          Add all null information from otherInits to this flow info and return this.
 FlowInfo addPotentialInitializationsFrom(FlowInfo otherInits)
          Compose other inits over this flow info, then return this.
 FlowInfo asNegatedCondition()
           
 FlowInfo copy()
          Return a deep copy of the current instance.
 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.
 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)
          Record a local got definitely 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)
          Record a local may have got assigned to unknown (set the bit on existing info).
 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 继承的方法
cannotBeDefinitelyNullOrNonNull, cannotBeNull, canOnlyBeNull, conditional, initial, markNullStatus, mergedOptimizedBranches, mergedOptimizedBranchesIfElse, nullStatus, reachMode
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

initsWhenTrue

public FlowInfo initsWhenTrue

initsWhenFalse

public FlowInfo initsWhenFalse
方法详细信息

addInitializationsFrom

public FlowInfo addInitializationsFrom(FlowInfo otherInits)
从类 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
参数:
otherInits - other inits to add to this
返回:
this, modified according to otherInits information

addNullInfoFrom

public FlowInfo addNullInfoFrom(FlowInfo otherInits)
从类 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 otherInits)
从类 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
参数:
otherInits - other inits to compose over this
返回:
this, modified according to otherInits information

asNegatedCondition

public FlowInfo asNegatedCondition()
覆盖:
FlowInfo 中的 asNegatedCondition

copy

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

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

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 boolean isDefinitelyAssigned(FieldBinding field)
从类 FlowInfo 复制的描述
Check status of definite assignment for a field.

指定者:
FlowInfo 中的 isDefinitelyAssigned

isDefinitelyAssigned

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

指定者:
FlowInfo 中的 isDefinitelyAssigned

isDefinitelyNonNull

public 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 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 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 boolean isPotentiallyAssigned(FieldBinding field)
从类 FlowInfo 复制的描述
Check status of potential assignment for a field.

指定者:
FlowInfo 中的 isPotentiallyAssigned

isPotentiallyAssigned

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

指定者:
FlowInfo 中的 isPotentiallyAssigned

isPotentiallyNonNull

public 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 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 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 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 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

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

resetNullInfo

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

指定者:
FlowInfo 中的 resetNullInfo

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

markAsDefinitelyUnknown

public void markAsDefinitelyUnknown(LocalVariableBinding local)
从类 FlowInfo 复制的描述
Record a local got definitely assigned to an unknown value.

指定者:
FlowInfo 中的 markAsDefinitelyUnknown

markPotentiallyUnknownBit

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

指定者:
FlowInfo 中的 markPotentiallyUnknownBit

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

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

toString

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

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

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.