Class DualFlowInfo
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.flow.FlowInfo
org.aspectj.org.eclipse.jdt.internal.compiler.flow.ConditionalFlowInfo
org.aspectj.org.eclipse.jdt.internal.compiler.flow.DualFlowInfo
A wrapper for two flow infos being co-maintained side-by-side.
All inherited methods that dispatch to the individual flow infos
ConditionalFlowInfo.initsWhenTrue and ConditionalFlowInfo.initsWhenFalse
are re-used as-is. Any operations involving some kind of copying need to be overridden.-
Field Summary
Fields inherited from class ConditionalFlowInfo
initsWhenFalse, initsWhenTrueFields inherited from class FlowInfo
DEAD_END, FREE_TYPEVARIABLE, NON_NULL, NULL, NULL_FLAG_MASK, POTENTIALLY_NON_NULL, POTENTIALLY_NULL, POTENTIALLY_UNKNOWN, REACHABLE, tagBits, UNKNOWN, UNREACHABLE, UNREACHABLE_BY_NULLANALYSIS, UNREACHABLE_OR_DEAD, UNROOTEDModifier and TypeFieldDescriptionstatic final UnconditionalFlowInfostatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intintstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Return a deep copy of the current instance.mergeDefiniteInitsWith(UnconditionalFlowInfo otherInits) 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).toString()Return a new flow info that holds the same information as this would after a call to unconditionalInits, but leaving this info unaffected.Return a new flow info that holds the same information as this would after a call tounconditionalInitsfollowed by the erasure of fields specific information, but leaving this flow info unaffected.Return a flow info that merges the possible paths of execution described by this flow info.Return a new flow info that holds the same information as this would after a call tounconditionalInits, but leaving this info unaffected.Methods inherited from class ConditionalFlowInfo
addInitializationsFrom, addNullInfoFrom, addPotentialInitializationsFrom, hasInits, hasNullInfoFor, initsWhenFalse, initsWhenTrue, isDefinitelyAssigned, isDefinitelyAssigned, isDefinitelyNonNull, isDefinitelyNull, isDefinitelyUnknown, isPotentiallyAssigned, isPotentiallyAssigned, isPotentiallyNonNull, isPotentiallyNull, isPotentiallyUnknown, isProtectedNonNull, isProtectedNull, markAsComparedEqualToNonNull, markAsComparedEqualToNull, markAsDefinitelyAssigned, markAsDefinitelyAssigned, markAsDefinitelyNonNull, markAsDefinitelyNull, markAsDefinitelyUnknown, markPotentiallyNonNullBit, markPotentiallyNullBit, markPotentiallyUnknownBit, nullInfoLessUnconditionalCopy, resetAssignmentInfo, resetNullInfo, safeInitsWhenTrue, setReachModeModifier and TypeMethodDescriptionaddInitializationsFrom(FlowInfo otherInits) Add other inits to this flow info, then return this.addNullInfoFrom(FlowInfo otherInits) Add all null information from otherInits to this flow info and return this.addPotentialInitializationsFrom(FlowInfo otherInits) Compose other inits over this flow info, then return this.booleanhasInits()Check if this flow info has any relevant inits.booleanCheck if any null info has been recorded for a given local variable.Return the flow info that would result from the path associated to the value false for the condition expression that generated this flow info.Return the flow info that would result from the path associated to the value true for the condition expression that generated this flow info.booleanisDefinitelyAssigned(FieldBinding field) Check status of definite assignment for a field.booleanCheck status of definite assignment for a local.booleanCheck status of definite non-null value for a given local variable.booleanCheck status of definite null value for a given local variable.booleanCheck status of definite unknown value for a given local variable.booleanCheck status of potential assignment for a field.booleanCheck status of potential assignment for a local variable.booleanCheck status of potential null assignment for a local.booleanCheck status of potential null assignment for a local.booleanReturn true if the given local may have been assigned to an unknown value.booleanReturn true if the given local is protected by a test against a non null value.booleanReturn true if the given local is protected by a test against null.voidRecord that a local variable got checked to be non null.voidRecord that a local variable got checked to be null.voidRecord a field got definitely assigned.voidRecord a local got definitely assigned.voidRecord a local got definitely assigned to a non-null value.voidRecord a local got definitely assigned to null.voidRecord a local got definitely assigned to an unknown value.voidRecord a local may have got assigned to non-null (set the bit on existing info).voidRecord a local may have got assigned to null (set the bit on existing info).voidRecord a local may have got assigned to unknown (set the bit on existing info).Return a copy of this unconditional flow info, deprived from its null info.voidResets the definite and potential initialization info for the given local variablevoidReset all null-information about a given local.Return a flow info that carries the same information as the result ofinitsWhenTrue, but warrantied to be different from this.
Caveat: side effects on the result may affect components of this.setReachMode(int reachMode) Set this flow info reach mode and return this.Methods inherited from class FlowInfo
cannotBeDefinitelyNullOrNonNull, cannotBeNull, canOnlyBeNull, conditional, initial, markNullStatus, mergedOptimizedBranches, mergedOptimizedBranchesIfElse, mergeNullStatus, nullInverse, nullStatus, reachMode, tagBitsToNullStatusModifier and TypeMethodDescriptionbooleanCheck 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.booleancannotBeNull(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.booleanCheck 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 FlowInfoconditional(FlowInfo initsWhenTrue, FlowInfo initsWhenFalse) static UnconditionalFlowInfoinitial(int maxFieldCount) voidmarkNullStatus(LocalVariableBinding local, int nullStatus) Mark the null status of the given local according to the given statusstatic UnconditionalFlowInfomergedOptimizedBranches(FlowInfo initsWhenTrue, boolean isOptimizedTrue, FlowInfo initsWhenFalse, boolean isOptimizedFalse, boolean allowFakeDeadBranch) Merge branches using optimized boolean conditionsstatic UnconditionalFlowInfomergedOptimizedBranchesIfElse(FlowInfo initsWhenTrue, boolean isOptimizedTrue, FlowInfo initsWhenFalse, boolean isOptimizedFalse, boolean allowFakeDeadBranch, FlowInfo flowInfo, IfStatement ifStatement, boolean reportDeadCodeInKnownPattern) Merge if-else branches using optimized boolean conditionsstatic intmergeNullStatus(int nullStatus1, int nullStatus2) Merge two single bits (NULL, NON_NULL, POTENTIALLY*..) into one.static intnullInverse(int status) intnullStatus(LocalVariableBinding local) Answer the null status of the given localintFind out the reachability mode of this flowInfo.static inttagBitsToNullStatus(long tagBits) Check whether 'tagBits' contains eitherTagBits.AnnotationNonNullorTagBits.AnnotationNullable, and answer the corresponding null status (FlowInfo.NON_NULLetc.).
-
Constructor Details
-
DualFlowInfo
-
-
Method Details
-
asNegatedCondition
- Overrides:
asNegatedConditionin classConditionalFlowInfo
-
copy
Description copied from class:FlowInfoReturn a deep copy of the current instance.- Overrides:
copyin classConditionalFlowInfo- Returns:
- a deep copy of this flow info
-
mergedWith
Description copied from class:FlowInfoReturn 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.
- Overrides:
mergedWithin classConditionalFlowInfo- Parameters:
otherInits- the flow info to merge with this- Returns:
- the intersection of this and otherInits.
- the receiver updated in the following way:
-
mergeDefiniteInitsWith
- Overrides:
mergeDefiniteInitsWithin classConditionalFlowInfo
-
unconditionalCopy
Description copied from class:FlowInfoReturn 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.- Overrides:
unconditionalCopyin classConditionalFlowInfo- Returns:
- a new flow info carrying this unconditional flow info
-
unconditionalFieldLessCopy
Description copied from class:FlowInfoReturn a new flow info that holds the same information as this would after a call tounconditionalInitsfollowed by the erasure of fields specific information, but leaving this flow info unaffected.- Overrides:
unconditionalFieldLessCopyin classConditionalFlowInfo- Returns:
- a new flow info carrying the unconditional flow info for local variables
-
unconditionalInits
Description copied from class:FlowInfoReturn 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.- Overrides:
unconditionalInitsin classConditionalFlowInfo- Returns:
- a flow info that merges the possible paths of execution described by this
-
unconditionalInitsWithoutSideEffect
Description copied from class:FlowInfoReturn a new flow info that holds the same information as this would after a call tounconditionalInits, but leaving this info unaffected. Side effects on the result might affect this though (consider it as read only).- Overrides:
unconditionalInitsWithoutSideEffectin classConditionalFlowInfo- Returns:
- a flow info carrying this unconditional flow info
-
toString
- Overrides:
toStringin classConditionalFlowInfo
-