Class InitializationTransfer<V extends CFAbstractValue<V>,T extends InitializationTransfer<V,T,S>,S extends InitializationStore<V,S>>     
java.lang.Object
org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor<TransferResult<V,S>,TransferInput<V,S>>
   
org.checkerframework.framework.flow.CFAbstractTransfer<V,S,T>
  
org.checkerframework.checker.initialization.InitializationTransfer<V,T,S>  
- Type Parameters:
- T- the type of the transfer function
- All Implemented Interfaces:
- ForwardTransferFunction<V,,- S> - TransferFunction<V,,- S> - NodeVisitor<TransferResult<V,- S>, - TransferInput<V, - S>> 
- Direct Known Subclasses:
- NullnessTransfer
public class InitializationTransfer<V extends CFAbstractValue<V>,T extends InitializationTransfer<V,T,S>,S extends InitializationStore<V,S>>     
extends CFAbstractTransfer<V,S,T>  
A transfer function that extends 
CFAbstractTransfer and tracks InitializationStores. In addition to the features of CFAbstractTransfer, this transfer
 function also tracks which fields of the current class ('self' receiver) have been initialized.
 More precisely, the following refinements are performed:
- After the call to a constructor (this()call), all non-null fields of the current class can safely be considered initialized.
- After a method call with a postcondition that ensures a field to be non-null, that field
       can safely be considered initialized (this is done in CFAbstractStore.insertValue(JavaExpression, CFAbstractValue)).
- All non-null fields with an initializer can be considered initialized (this is done in
       CFAbstractStore.insertValue(JavaExpression, CFAbstractValue)).
- After the call to a super constructor ("super()" call), all non-null fields of the super class can safely be considered initialized.
- See Also:
- 
Field SummaryFieldsFields inherited from class org.checkerframework.framework.flow.CFAbstractTransferanalysis, sequentialSemantics
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected List<VariableElement>Returns the fields that can safely be considered initialized after the method callnode.protected booleanisNotFullyInitializedReceiver(MethodTree methodTree) Returns true if the receiver of a method or constructor might not yet be fully initialized.protected voidmarkInvariantFieldsAsInitialized(List<VariableElement> result, TypeElement clazzElem) Adds all the fields of the classclazzElemthat have the 'invariant annotation' to the set of initialized fieldsresult.visitAssignment(AssignmentNode n, TransferInput<V, S> in) If an invariant field is initialized and has the invariant annotation, than it has at least the invariant annotation.Methods inherited from class org.checkerframework.framework.flow.CFAbstractTransferaddInformationFromPreconditions, createTransferResult, finishValue, finishValue, getNarrowedValue, getValueFromFactory, getWidenedValue, initialStore, insertIntoStores, moreSpecificValue, processCommonAssignment, processConditionalPostconditions, processPostconditions, recreateTransferResult, setFixedInitialStore, splitAssignments, strengthenAnnotationOfEqualTo, usesSequentialSemantics, visitArrayAccess, visitCase, visitClassName, visitConditionalNot, visitEqualTo, visitExpressionStatement, visitInstanceOf, visitLambdaResultExpression, visitLocalVariable, visitNarrowingConversion, visitNode, visitNotEqual, visitObjectCreation, visitReturn, visitStringConversion, visitSwitchExpressionNode, visitTernaryExpression, visitThis, visitVariableDeclaration, visitWideningConversionMethods inherited from class org.checkerframework.dataflow.cfg.node.AbstractNodeVisitorvisitArrayCreation, visitArrayType, visitAssertionError, visitBitwiseAnd, visitBitwiseComplement, visitBitwiseOr, visitBitwiseXor, visitBooleanLiteral, visitCharacterLiteral, visitClassDeclaration, visitConditionalAnd, visitConditionalOr, visitDeconstructorPattern, visitDoubleLiteral, visitExplicitThis, visitFloatingDivision, visitFloatingRemainder, visitFloatLiteral, visitGreaterThan, visitGreaterThanOrEqual, visitImplicitThis, visitIntegerDivision, visitIntegerLiteral, visitIntegerRemainder, visitLeftShift, visitLessThan, visitLessThanOrEqual, visitLongLiteral, visitMarker, visitMemberReference, visitMethodAccess, visitNullChk, visitNullLiteral, visitNumericalAddition, visitNumericalMinus, visitNumericalMultiplication, visitNumericalPlus, visitNumericalSubtraction, visitPackageName, visitParameterizedType, visitPrimitiveType, visitShortLiteral, visitSignedRightShift, visitStringConcatenate, visitStringLiteral, visitSuper, visitSynchronized, visitThrow, visitTypeCast, visitUnsignedRightShift, visitValueLiteralMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.checkerframework.dataflow.cfg.node.NodeVisitorvisitArrayCreation, visitArrayType, visitAssertionError, visitBitwiseAnd, visitBitwiseComplement, visitBitwiseOr, visitBitwiseXor, visitBooleanLiteral, visitCharacterLiteral, visitClassDeclaration, visitConditionalAnd, visitConditionalOr, visitDeconstructorPattern, visitDoubleLiteral, visitExplicitThis, visitFloatingDivision, visitFloatingRemainder, visitFloatLiteral, visitGreaterThan, visitGreaterThanOrEqual, visitImplicitThis, visitIntegerDivision, visitIntegerLiteral, visitIntegerRemainder, visitLeftShift, visitLessThan, visitLessThanOrEqual, visitLongLiteral, visitMarker, visitMemberReference, visitMethodAccess, visitNullChk, visitNullLiteral, visitNumericalAddition, visitNumericalMinus, visitNumericalMultiplication, visitNumericalPlus, visitNumericalSubtraction, visitPackageName, visitParameterizedType, visitPrimitiveType, visitShortLiteral, visitSignedRightShift, visitStringConcatenate, visitStringLiteral, visitSuper, visitSynchronized, visitThrow, visitTypeCast, visitUnsignedRightShift
- 
Field Details- 
atypeFactory
 
- 
- 
Constructor Details- 
InitializationTransfer
 
- 
- 
Method Details- 
isNotFullyInitializedReceiverDescription copied from class:CFAbstractTransferReturns true if the receiver of a method or constructor might not yet be fully initialized.- Overrides:
- isNotFullyInitializedReceiverin class- CFAbstractTransfer<V extends CFAbstractValue<V>,- S extends InitializationStore<V, - S>, - T extends InitializationTransfer<V, - T, - S>> 
- Parameters:
- methodTree- the declaration of the method or constructor
- Returns:
- true if the receiver of a method or constructor might not yet be fully initialized
 
- 
initializedFieldsAfterCallReturns the fields that can safely be considered initialized after the method callnode.- Parameters:
- node- a method call
- Returns:
- the fields that are initialized after the method call
 
- 
markInvariantFieldsAsInitializedprotected void markInvariantFieldsAsInitialized(List<VariableElement> result, TypeElement clazzElem) Adds all the fields of the classclazzElemthat have the 'invariant annotation' to the set of initialized fieldsresult.
- 
visitAssignment- Specified by:
- visitAssignmentin interface- NodeVisitor<V extends CFAbstractValue<V>,- T extends InitializationTransfer<V, - T, - S>> 
- Overrides:
- visitAssignmentin class- CFAbstractTransfer<V extends CFAbstractValue<V>,- S extends InitializationStore<V, - S>, - T extends InitializationTransfer<V, - T, - S>> 
 
- 
visitFieldAccessIf an invariant field is initialized and has the invariant annotation, than it has at least the invariant annotation. Note that only fields of the 'this' receiver are tracked for initialization.- Specified by:
- visitFieldAccessin interface- NodeVisitor<V extends CFAbstractValue<V>,- T extends InitializationTransfer<V, - T, - S>> 
- Overrides:
- visitFieldAccessin class- CFAbstractTransfer<V extends CFAbstractValue<V>,- S extends InitializationStore<V, - S>, - T extends InitializationTransfer<V, - T, - S>> 
 
- 
visitMethodInvocation- Specified by:
- visitMethodInvocationin interface- NodeVisitor<V extends CFAbstractValue<V>,- T extends InitializationTransfer<V, - T, - S>> 
- Overrides:
- visitMethodInvocationin class- CFAbstractTransfer<V extends CFAbstractValue<V>,- S extends InitializationStore<V, - S>, - T extends InitializationTransfer<V, - T, - S>> 
 
 
-