checkers.types
Class AnnotatedTypeMirror.AnnotatedExecutableType

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

public static class AnnotatedTypeMirror.AnnotatedExecutableType
extends AnnotatedTypeMirror

Represents a type of an executable. An executable is a method, constructor, or initializer.


Nested Class Summary
Modifier and Type Class and Description
 
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
Modifier and Type Field and Description
 
Fields inherited from class checkers.types.AnnotatedTypeMirror
annotationFactory, annotations, element, enclosingType, env, typeFactory
 
Method Summary
Modifier and Type Method and Description
<R,P> R
accept(AnnotatedTypeVisitor<R,P> v, P p)
          Applies a visitor to this type.
 AnnotatedTypeMirror.AnnotatedExecutableType getCopy(boolean annotation)
          Returns a shallow copy of this type.
 ExecutableElement getElement()
          Returns the element associated with the value the type represent, if any.
 AnnotatedTypeMirror.AnnotatedExecutableType getErased()
          Returns the erasure type of the this type, according to JLS specifications.
 List<AnnotatedTypeMirror> getParameterTypes()
           
 AnnotatedTypeMirror.AnnotatedDeclaredType getReceiverType()
           
 AnnotatedTypeMirror getReturnType()
           
 List<AnnotatedTypeMirror> getThrownTypes()
           
 List<AnnotatedTypeMirror.AnnotatedTypeVariable> getTypeVariables()
           
 ExecutableType getUnderlyingType()
          Returns the underlying unannotated Java type wrapped with this
 boolean isVarArgs()
           
 AnnotatedTypeMirror.AnnotatedExecutableType substitute(Map<? extends AnnotatedTypeMirror,? extends AnnotatedTypeMirror> mappings)
          Sub
 String toString()
           
 
Methods inherited from class checkers.types.AnnotatedTypeMirror
addAnnotation, addAnnotation, addAnnotations, clearAnnotations, copyFields, createType, createTypeOfObject, directSuperTypes, directSuperTypes, equals, formatAnnotationString, getAnnotation, getAnnotation, getAnnotation, getAnnotations, getEnclosingType, getKind, hasAnnotation, hasAnnotation, hashCode, removeAnnotation, removeAnnotation, removeAnnotations
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isVarArgs

public boolean isVarArgs()
Returns:
true if this type represents a varargs method

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 ExecutableType getUnderlyingType()
Description copied from class: AnnotatedTypeMirror
Returns the underlying unannotated Java type wrapped with this

Overrides:
getUnderlyingType in class AnnotatedTypeMirror
Returns:
the underlying type

getParameterTypes

public List<AnnotatedTypeMirror> getParameterTypes()
Returns:
the parameter types of this executable type

getReturnType

public AnnotatedTypeMirror getReturnType()
Returns:
the return type of this executable type

getReceiverType

public AnnotatedTypeMirror.AnnotatedDeclaredType getReceiverType()
Returns:
the receiver type of this executable type

getThrownTypes

public List<AnnotatedTypeMirror> getThrownTypes()
Returns:
the thrown types of this executable type

getTypeVariables

public List<AnnotatedTypeMirror.AnnotatedTypeVariable> getTypeVariables()
Returns:
the type variables of this executable type, if any

getCopy

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

getElement

@NonNull
public ExecutableElement getElement()
Description copied from class: AnnotatedTypeMirror
Returns the element associated with the value the type represent, if any. I.e. For 'Integer i;' the element would be for 'i' not 'Integer'

Overrides:
getElement in class AnnotatedTypeMirror
Returns:
the Element of the value of this type, if one exists

getErased

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

substitute

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

Overrides:
substitute in class AnnotatedTypeMirror

toString

public String toString()
Overrides:
toString in class AnnotatedTypeMirror