Class AnnotatedTypeMirror.AnnotatedArrayType
- All Implemented Interfaces:
DeepCopyable<AnnotatedTypeMirror>
- Enclosing class:
AnnotatedTypeMirror
-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.framework.type.AnnotatedTypeMirror
AnnotatedTypeMirror.AnnotatedArrayType, AnnotatedTypeMirror.AnnotatedDeclaredType, AnnotatedTypeMirror.AnnotatedExecutableType, AnnotatedTypeMirror.AnnotatedIntersectionType, AnnotatedTypeMirror.AnnotatedNoType, AnnotatedTypeMirror.AnnotatedNullType, AnnotatedTypeMirror.AnnotatedPrimitiveType, AnnotatedTypeMirror.AnnotatedTypeVariable, AnnotatedTypeMirror.AnnotatedUnionType, AnnotatedTypeMirror.AnnotatedWildcardType, AnnotatedTypeMirror.ErrorTypeKindException -
Field Summary
Fields inherited from class org.checkerframework.framework.type.AnnotatedTypeMirror
atypeFactory, EQUALITY_COMPARER, HASHCODE_VISITOR, primaryAnnotations, underlyingType -
Method Summary
Modifier and TypeMethodDescription<R,P> R accept(AnnotatedTypeVisitor<R, P> v, P p) Applies a visitor to this type.deepCopy()Returns a deep copy of this type with annotations.deepCopy(boolean copyAnnotations) Returns a deep copy of this type.Returns the component type of this array.Returns the erasure type of this type, according to JLS specifications.getKind()Returns thekindof this type.Returns the underlying unannotated Java type, which this wraps.voidSets the component type of this array.Returns a shallow copy of this type with annotations.shallowCopy(boolean copyAnnotations) Returns a shallow copy of this type.Methods inherited from class org.checkerframework.framework.type.AnnotatedTypeMirror
addAnnotation, addAnnotations, addAnnotations, addMissingAnnotation, addMissingAnnotations, addMissingAnnotations, asUse, checkMutable, clearAnnotations, containsCapturedTypes, createType, createTypeOfObject, createTypeOfRecord, directSupertypes, equals, freeze, getAnnotation, getAnnotation, getAnnotationInHierarchy, getAnnotations, getAnnotationsField, getEffectiveAnnotation, getEffectiveAnnotationInHierarchy, getEffectiveAnnotations, getExplicitAnnotations, getPrimitiveKind, getUnderlyingTypeHashCode, hasAnnotation, hasAnnotation, hasAnnotationInHierarchy, hasAnnotationRelaxed, hasEffectiveAnnotation, hasEffectiveAnnotation, hasEffectiveAnnotationRelaxed, hasExplicitAnnotation, hasExplicitAnnotation, hasExplicitAnnotationRelaxed, hashCode, isDeclaration, isFrozen, removeAnnotation, removeAnnotationByClass, removeAnnotationInHierarchy, removeAnnotations, replaceAnnotation, replaceAnnotations, replaceAnnotations, toString, toString
-
Method Details
-
getKind
Description copied from class:AnnotatedTypeMirrorReturns thekindof this type.Subclasses whose kind is constant (e.g.
AnnotatedTypeMirror.AnnotatedDeclaredType,AnnotatedTypeMirror.AnnotatedArrayType) override this to return the constant directly; this is meaningful for performance because the underlying javacType#getKind()on declared types runsSymbol#apiComplete. OnlyAnnotatedTypeMirror.AnnotatedPrimitiveTypeandAnnotatedTypeMirror.AnnotatedNoTypefall through to this base implementation; for both, the underlying type'sgetKind()is cheap and does not force symbol completion.- Overrides:
getKindin classAnnotatedTypeMirror- Returns:
- the kind of this type
-
accept
Description copied from class:AnnotatedTypeMirrorApplies a visitor to this type.- Specified by:
acceptin classAnnotatedTypeMirror- Type Parameters:
R- the return type of the visitor's methodsP- the type of the additional parameter to the visitor's methods- Parameters:
v- the visitor operating on this typep- additional parameter to the visitor- Returns:
- a visitor-specified result
-
getUnderlyingType
Description copied from class:AnnotatedTypeMirrorReturns the underlying unannotated Java type, which this wraps.- Overrides:
getUnderlyingTypein classAnnotatedTypeMirror- Returns:
- the underlying type
-
setComponentType
Sets the component type of this array.- Parameters:
type- the component type
-
getComponentType
Returns the component type of this array.- Returns:
- the component type of this array
-
deepCopy
Description copied from class:AnnotatedTypeMirrorReturns a deep copy of this type. A deep copy implies that each component type is copied recursively and the returned type refers to those copies in its component locations.Note: deepCopy provides two important properties in the returned copy:
- Structure preservation -- The exact structure of the original AnnotatedTypeMirror is preserved in the copy including all component types.
- Annotation preservation -- All of the annotations from the original AnnotatedTypeMirror and its components have been copied to the new type.
- Specified by:
deepCopyin classAnnotatedTypeMirror- Returns:
- a deep copy
-
deepCopy
Description copied from class:AnnotatedTypeMirrorReturns a deep copy of this type with annotations.Each subclass implements this method with the subclass return type. The method body must always be a call to deepCopy(true).
- Specified by:
deepCopyin interfaceDeepCopyable<AnnotatedTypeMirror>- Specified by:
deepCopyin classAnnotatedTypeMirror- Returns:
- a deep copy of this type with annotations
- See Also:
-
shallowCopy
Description copied from class:AnnotatedTypeMirrorReturns a shallow copy of this type. A shallow copy implies that each component type in the output copy refers to the same object as the object being copied.- Specified by:
shallowCopyin classAnnotatedTypeMirror- Parameters:
copyAnnotations- true if copy should have annotations, i.e., fieldannotationsshould be copied- Returns:
- a shallow copy of this type
-
shallowCopy
Description copied from class:AnnotatedTypeMirrorReturns a shallow copy of this type with annotations.Each subclass implements this method with the subclass return type. The method body must always be a call to shallowCopy(true).
- Specified by:
shallowCopyin classAnnotatedTypeMirror- Returns:
- a shallow copy of this type with annotations
- See Also:
-
getErased
Description copied from class:AnnotatedTypeMirrorReturns the erasure type of this type, according to JLS specifications.- Overrides:
getErasedin classAnnotatedTypeMirror- Returns:
- the erasure of this AnnotatedTypeMirror, this is always a copy even if the erasure and the original type are equivalent
- See Also:
-