checkers.types
Class AnnotatedTypeMirror.AnnotatedWildcardType

java.lang.Object
  extended by checkers.types.AnnotatedTypeMirror
      extended by checkers.types.AnnotatedTypeMirror.AnnotatedWildcardType
Enclosing class:
AnnotatedTypeMirror

public static class AnnotatedTypeMirror.AnnotatedWildcardType
extends AnnotatedTypeMirror

Represents a wildcard type argument. Examples include: ? ? extends Number ? super T A wildcard may have its upper bound explicitly set by an extends clause, its lower bound explicitly set by a super clause, or neither (but not both).


Nested Class Summary
 
Nested classes/interfaces inherited from class checkers.types.AnnotatedTypeMirror
AnnotatedTypeMirror.AnnotatedArrayType, AnnotatedTypeMirror.AnnotatedDeclaredType, AnnotatedTypeMirror.AnnotatedExecutableType, AnnotatedTypeMirror.AnnotatedNoType, AnnotatedTypeMirror.AnnotatedNullType, AnnotatedTypeMirror.AnnotatedPrimitiveType, AnnotatedTypeMirror.AnnotatedReferenceType, AnnotatedTypeMirror.AnnotatedTypeVariable, AnnotatedTypeMirror.AnnotatedWildcardType
 
Field Summary
 
Fields inherited from class checkers.types.AnnotatedTypeMirror
annotationFactory, annotations, element, enclosingType, env, typeFactory
 
Method Summary
<R,P> R
accept(AnnotatedTypeVisitor<R,P> v, P p)
          Applies a visitor to this type.
 Set<AnnotationMirror> getAnnotations()
          Returns the annotations on this type.
 AnnotatedTypeMirror.AnnotatedWildcardType getCopy(boolean annotation)
          Returns a shallow copy of this type.
 AnnotatedTypeMirror getErased()
          Returns the erasure type of the this type, according to JLS specifications.
 AnnotatedTypeMirror getExtendsBound()
           
 AnnotatedTypeMirror getSuperBound()
           
 WildcardType getUnderlyingType()
          Returns the underlying unannotated Java type wrapped with this
 AnnotatedTypeMirror substitute(Map<? extends AnnotatedTypeMirror,? extends AnnotatedTypeMirror> mappings)
          Sub
 String toString()
           
 
Methods inherited from class checkers.types.AnnotatedTypeMirror
addAnnotation, addAnnotations, clearAnnotations, copyFields, createType, createTypeOfObject, directSuperTypes, directSuperTypes, equals, formatAnnotationString, getAnnotation, getAnnotation, getElement, getEnclosingType, getKind, hasAnnotation, hashCode, removeAnnotation, removeAnnotations
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getSuperBound

public AnnotatedTypeMirror getSuperBound()
Returns:
the lower bound of this wildcard. If no lower bound is explicitly declared, null is returned.

getExtendsBound

public AnnotatedTypeMirror getExtendsBound()
Returns:
the lower bound of this wildcard. If no lower bound is explicitly declared, null is returned.

accept

public <R,P> R accept(AnnotatedTypeVisitor<R,P> v,
                      P p)
Description copied from class: AnnotatedTypeMirror
Applies a visitor to this type.

Specified by:
accept in class AnnotatedTypeMirror
Type Parameters:
R - the return type of the visitor's methods
P - the type of the additional parameter to the visitor's methods
Parameters:
v - the visitor operating on this type
p - additional parameter to the visitor
Returns:
a visitor-specified result

getUnderlyingType

public WildcardType getUnderlyingType()
Description copied from class: AnnotatedTypeMirror
Returns the underlying unannotated Java type wrapped with this

Overrides:
getUnderlyingType in class AnnotatedTypeMirror
Returns:
the underlying type

getCopy

public AnnotatedTypeMirror.AnnotatedWildcardType getCopy(boolean annotation)
Description copied from class: AnnotatedTypeMirror
Returns a shallow copy of this type.

Specified by:
getCopy in class AnnotatedTypeMirror
Parameters:
annotation - whether copy should have annotations

substitute

public AnnotatedTypeMirror substitute(Map<? extends AnnotatedTypeMirror,? extends AnnotatedTypeMirror> mappings)
Description copied from class: AnnotatedTypeMirror
Sub

Overrides:
substitute in class AnnotatedTypeMirror

getErased

public AnnotatedTypeMirror getErased()
Description copied from class: AnnotatedTypeMirror
Returns the erasure type of the this type, according to JLS specifications.

Overrides:
getErased in class AnnotatedTypeMirror
Returns:
the erasure of this

toString

public String toString()
Overrides:
toString in class AnnotatedTypeMirror

getAnnotations

public Set<AnnotationMirror> getAnnotations()
Description copied from class: AnnotatedTypeMirror
Returns the annotations on this type. It does not include annotations in deep types (type arguments, array components, etc).

Overrides:
getAnnotations in class AnnotatedTypeMirror
Returns:
a set of the annotations on this