checkers.types
Class AnnotatedTypeMirror.AnnotatedDeclaredType

java.lang.Object
  extended by checkers.types.AnnotatedTypeMirror
      extended by checkers.types.AnnotatedTypeMirror.AnnotatedDeclaredType
All Implemented Interfaces:
AnnotatedTypeMirror.AnnotatedReferenceType
Enclosing class:
AnnotatedTypeMirror

public static class AnnotatedTypeMirror.AnnotatedDeclaredType
extends AnnotatedTypeMirror
implements AnnotatedTypeMirror.AnnotatedReferenceType

Represents a declared type (whether class or interface).


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
protected  DeclaredType actualType
           
protected  List<AnnotatedTypeMirror.AnnotatedDeclaredType> interfaces
          Deprecated. 
protected  AnnotatedTypeMirror.AnnotatedDeclaredType superclass
          Deprecated. 
protected  List<AnnotatedTypeMirror.AnnotatedDeclaredType> supertypes
           
protected  List<AnnotatedTypeMirror> typeArgs
          Parametrized Type Arguments
 
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.
 List<AnnotatedTypeMirror.AnnotatedDeclaredType> directSuperTypes()
           
 AnnotatedTypeMirror.AnnotatedDeclaredType getCopy(boolean annotation)
          Returns a shallow copy of this type.
 AnnotatedTypeMirror.AnnotatedDeclaredType getErased()
          Returns the erasure type of the this type, according to JLS specifications.
 List<AnnotatedTypeMirror.AnnotatedDeclaredType> getInterfaces()
          Deprecated. 
 AnnotatedTypeMirror getSuperclass()
          Deprecated. 
 List<AnnotatedTypeMirror> getTypeArguments()
           
 DeclaredType getUnderlyingType()
          Returns the underlying unannotated Java type wrapped with this
 boolean isGeneric()
          Returns true if the type is generic, even if the type is erased or used as a RAW type.
 boolean isParameterized()
          Returns true if the type is a generic type and the type declaration is parameterized.
 AnnotatedTypeMirror substitute(Map<? extends AnnotatedTypeMirror,? extends AnnotatedTypeMirror> mapping)
          Sub
 String toString()
           
 
Methods inherited from class checkers.types.AnnotatedTypeMirror
addAnnotation, addAnnotations, clearAnnotations, copyFields, createType, createTypeOfObject, directSuperTypes, equals, formatAnnotationString, getAnnotation, getAnnotation, getAnnotations, getElement, getEnclosingType, getKind, hasAnnotation, hashCode, removeAnnotation, removeAnnotations
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

typeArgs

protected List<AnnotatedTypeMirror> typeArgs
Parametrized Type Arguments


superclass

@Deprecated
protected AnnotatedTypeMirror.AnnotatedDeclaredType superclass
Deprecated. 
Supertype of this type


interfaces

@Deprecated
protected List<AnnotatedTypeMirror.AnnotatedDeclaredType> interfaces
Deprecated. 
The interfaces that this type implements


actualType

protected final DeclaredType actualType

supertypes

protected List<AnnotatedTypeMirror.AnnotatedDeclaredType> supertypes
Method Detail

toString

public String toString()
Overrides:
toString in class AnnotatedTypeMirror

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

getTypeArguments

public List<AnnotatedTypeMirror> getTypeArguments()
Returns:
the type argument for this type

getSuperclass

@Deprecated
public AnnotatedTypeMirror getSuperclass()
Deprecated. 

Returns:
the super type of this

isGeneric

public boolean isGeneric()
Returns true if the type is generic, even if the type is erased or used as a RAW type.

Returns:
true iff the type is generic

isParameterized

public boolean isParameterized()
Returns true if the type is a generic type and the type declaration is parameterized. Otherwise, it returns false, in cases where a type is a raw type or a non-generic type. Note: Even if the type is a raw type, the framework actually adds type arguments to the type.


getInterfaces

@Deprecated
public List<AnnotatedTypeMirror.AnnotatedDeclaredType> getInterfaces()
Deprecated. 

Returns:
the interfaces of this type

getUnderlyingType

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

Overrides:
getUnderlyingType in class AnnotatedTypeMirror
Returns:
the underlying type

directSuperTypes

public List<AnnotatedTypeMirror.AnnotatedDeclaredType> directSuperTypes()
Overrides:
directSuperTypes in class AnnotatedTypeMirror

getCopy

public AnnotatedTypeMirror.AnnotatedDeclaredType 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> mapping)
Description copied from class: AnnotatedTypeMirror
Sub

Overrides:
substitute in class AnnotatedTypeMirror

getErased

public AnnotatedTypeMirror.AnnotatedDeclaredType 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