APIdia Launch Partner
Top Description Methods
javax.lang.model.type

public Interface ExecutableType

extends TypeMirror
Imports
java.util.List, javax.lang.model.element.ExecutableElement

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

The executable is represented as when viewed as a method (or constructor or initializer) of some reference type. If that reference type is parameterized, then its actual type arguments are substituted into any types returned by the methods of this interface.

Since
1.6
See Also
ExecutableElement

Method Summary

Modifier and TypeMethod and Description
public List<? extends TypeMirror>

Returns:

the types of this executable's formal parameters, or an empty list if there are none
getParameterTypes
()

Returns the types of this executable's formal parameters.

public TypeMirror

Returns:

the receiver type of this executable
getReceiverType
()

Returns the receiver type of this executable, or NoType with kind NONE if the executable has no receiver type.

public TypeMirror

Returns:

the return type of this executable
getReturnType
()

Returns the return type of this executable.

public List<? extends TypeMirror>

Returns:

the exceptions and other throwables listed in this executable's throws clause, or an empty list if there are none.
getThrownTypes
()

Returns the exceptions and other throwables listed in this executable's throws clause.

public List<? extends TypeVariable>

Returns:

the type variables declared by the formal type parameters, or an empty list if there are none
getTypeVariables
()

Returns the type variables declared by the formal type parameters of this executable.

Inherited from javax.lang.model.type.TypeMirror:
acceptequalsgetAnnotationgetAnnotationMirrorsgetAnnotationsByTypegetKindhashCodetoString

Method Detail

getParameterTypesback to summary
public List<? extends TypeMirror> getParameterTypes()

Returns the types of this executable's formal parameters.

Returns:List<? extends TypeMirror>

the types of this executable's formal parameters, or an empty list if there are none

getReceiverTypeback to summary
public TypeMirror getReceiverType()

Returns the receiver type of this executable, or NoType with kind NONE if the executable has no receiver type. An executable which is an instance method, or a constructor of an inner class, has a receiver type derived from the declaring type. An executable which is a static method, or a constructor of a non-inner class, or an initializer (static or instance), has no receiver type.

Returns:TypeMirror

the receiver type of this executable

Since
1.8
Java Language Specification
8.4 Method Declarations, 8.4.1 Formal Parameters, 8.8 Constructor Declarations
getReturnTypeback to summary
public TypeMirror getReturnType()

Returns the return type of this executable. Returns a NoType with kind VOID if this executable is not a method, or is a method that does not return a value.

Returns:TypeMirror

the return type of this executable

getThrownTypesback to summary
public List<? extends TypeMirror> getThrownTypes()

Returns the exceptions and other throwables listed in this executable's throws clause.

Returns:List<? extends TypeMirror>

the exceptions and other throwables listed in this executable's throws clause, or an empty list if there are none.

getTypeVariablesback to summary
public List<? extends TypeVariable> getTypeVariables()

Returns the type variables declared by the formal type parameters of this executable.

Returns:List<? extends TypeVariable>

the type variables declared by the formal type parameters, or an empty list if there are none