24 */ 25 26 package javax.lang.model.element; 27 28 import java.util.List; 29 import javax.lang.model.type.*; 30 31 /** 32 * Represents a method, constructor, or initializer (static or 33 * instance) of a class or interface, including annotation type 34 * elements. 35 * 36 * @author Joseph D. Darcy 37 * @author Scott Seligman 38 * @author Peter von der Ahé 39 * @see ExecutableType 40 * @since 1.6 41 */ 42 public interface ExecutableElement extends Element, Parameterizable { 43 /** 44 * Returns the formal type parameters of this executable 45 * in declaration order. 46 * 47 * @return the formal type parameters, or an empty list 48 * if there are none 49 */ 50 List<? extends TypeParameterElement> getTypeParameters(); 51 52 /** 53 * Returns the return type of this executable. 54 * Returns a {@link NoType} with kind {@link TypeKind#VOID VOID} 55 * if this executable is not a method, or is a method that does not 56 * return a value. 57 * 58 * @return the return type of this executable 59 */ 60 TypeMirror getReturnType(); 61 62 /** 63 * Returns the formal parameters of this executable. | 24 */ 25 26 package javax.lang.model.element; 27 28 import java.util.List; 29 import javax.lang.model.type.*; 30 31 /** 32 * Represents a method, constructor, or initializer (static or 33 * instance) of a class or interface, including annotation type 34 * elements. 35 * 36 * @author Joseph D. Darcy 37 * @author Scott Seligman 38 * @author Peter von der Ahé 39 * @see ExecutableType 40 * @since 1.6 41 */ 42 public interface ExecutableElement extends Element, Parameterizable { 43 /** 44 * Returns the {@linkplain ExecutableType executable type} defined 45 * by this executable element. 46 * 47 * @return the type executable type defined by this executable element 48 */ 49 @Override 50 TypeMirror asType(); 51 52 /** 53 * Returns the formal type parameters of this executable 54 * in declaration order. 55 * 56 * @return the formal type parameters, or an empty list 57 * if there are none 58 */ 59 List<? extends TypeParameterElement> getTypeParameters(); 60 61 /** 62 * Returns the return type of this executable. 63 * Returns a {@link NoType} with kind {@link TypeKind#VOID VOID} 64 * if this executable is not a method, or is a method that does not 65 * return a value. 66 * 67 * @return the return type of this executable 68 */ 69 TypeMirror getReturnType(); 70 71 /** 72 * Returns the formal parameters of this executable. |