This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.lang.model.element
interface ExecutableElement

All Superinterfaces:
Element

public interface ExecutableElement
extends Element

Represents a method, constructor, or initializer (static or instance) of a class or interface, including annotation type elements.


Method Summary
 AnnotationValue

          Returns the default value if this executable is an annotation type element.
 List

          Returns the formal parameters of this executable.
 TypeMirror

          Returns the return type of this executable.
 List

          Returns the exceptions and other throwables listed in this method or constructor's clause in declaration order.
 List

          Returns the formal type parameters of this executable in declaration order.
 boolean

          Returns if this method or constructor accepts a variable number of arguments and returns otherwise.
 
Methods inherited from class javax.lang.model.element.Element
accept, asType, equals, getAnnotation, getAnnotationMirrors, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getSimpleName, hashCode
 

Method Detail

getDefaultValue

public AnnotationValue getDefaultValue()
Returns the default value if this executable is an annotation type element. Returns {@code null} if this method is not an annotation type element, or if it is an annotation type element with no default value.

Returns:
the default value, or {@code null} if none

getParameters

public List getParameters()
Returns the formal parameters of this executable. They are returned in declaration order.

Returns:
the formal parameters, or an empty list if there are none

getReturnType

public TypeMirror getReturnType()
Returns the return type of this executable. Returns a {@link NoType} with kind {@link TypeKind#VOID VOID} if this executable is not a method, or is a method that does not return a value.

Returns:
the return type of this executable

getThrownTypes

public List getThrownTypes()
Returns the exceptions and other throwables listed in this method or constructor's {@code throws} clause in declaration order.

Returns:
the exceptions and other throwables listed in the {@code throws} clause, or an empty list if there are none

getTypeParameters

public List getTypeParameters()
Returns the formal type parameters of this executable in declaration order.

Returns:
the formal type parameters, or an empty list if there are none

isVarArgs

public boolean isVarArgs()
Returns {@code true} if this method or constructor accepts a variable number of arguments and returns {@code false} otherwise.

Returns:
{@code true} if this method or constructor accepts a variable number of arguments and {@code false} otherwise


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.