0N/A/*
848N/A * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
553N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
553N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A * or visit www.oracle.com if you need additional information or have any
553N/A * questions.
0N/A */
0N/A
0N/Apackage javax.lang.model.element;
0N/A
0N/Aimport java.util.List;
0N/Aimport javax.lang.model.util.Types;
0N/Aimport javax.lang.model.type.*;
0N/A
0N/A/**
0N/A * Represents a method, constructor, or initializer (static or
0N/A * instance) of a class or interface, including annotation type
0N/A * elements.
0N/A *
0N/A * @author Joseph D. Darcy
0N/A * @author Scott Seligman
0N/A * @author Peter von der Ahé
0N/A * @see ExecutableType
0N/A * @since 1.6
0N/A */
223N/Apublic interface ExecutableElement extends Element, Parameterizable {
0N/A /**
0N/A * Returns the formal type parameters of this executable
0N/A * in declaration order.
0N/A *
0N/A * @return the formal type parameters, or an empty list
0N/A * if there are none
0N/A */
0N/A List<? extends TypeParameterElement> getTypeParameters();
0N/A
0N/A /**
0N/A * Returns the return type of this executable.
0N/A * Returns a {@link NoType} with kind {@link TypeKind#VOID VOID}
0N/A * if this executable is not a method, or is a method that does not
0N/A * return a value.
0N/A *
0N/A * @return the return type of this executable
0N/A */
0N/A TypeMirror getReturnType();
0N/A
0N/A /**
0N/A * Returns the formal parameters of this executable.
0N/A * They are returned in declaration order.
0N/A *
0N/A * @return the formal parameters,
0N/A * or an empty list if there are none
0N/A */
0N/A List<? extends VariableElement> getParameters();
0N/A
0N/A /**
0N/A * Returns {@code true} if this method or constructor accepts a variable
0N/A * number of arguments and returns {@code false} otherwise.
0N/A *
0N/A * @return {@code true} if this method or constructor accepts a variable
0N/A * number of arguments and {@code false} otherwise
0N/A */
0N/A boolean isVarArgs();
0N/A
0N/A /**
0N/A * Returns the exceptions and other throwables listed in this
0N/A * method or constructor's {@code throws} clause in declaration
0N/A * order.
0N/A *
0N/A * @return the exceptions and other throwables listed in the
0N/A * {@code throws} clause, or an empty list if there are none
0N/A */
0N/A List<? extends TypeMirror> getThrownTypes();
0N/A
0N/A /**
0N/A * Returns the default value if this executable is an annotation
0N/A * type element. Returns {@code null} if this method is not an
0N/A * annotation type element, or if it is an annotation type element
0N/A * with no default value.
0N/A *
0N/A * @return the default value, or {@code null} if none
0N/A */
0N/A AnnotationValue getDefaultValue();
848N/A
848N/A /**
848N/A * Returns the simple name of a constructor, method, or
848N/A * initializer. For a constructor, the name {@code "<init>"} is
848N/A * returned, for a static initializer, the name {@code "<clinit>"}
848N/A * is returned, and for an anonymous class or instance
848N/A * initializer, an empty name is returned.
848N/A *
848N/A * @return the simple name of a constructor, method, or
848N/A * initializer
848N/A */
848N/A @Override
848N/A Name getSimpleName();
0N/A}