src/share/classes/javax/lang/model/type/ExecutableType.java

Fri, 06 Feb 2009 12:49:48 -0800

author
darcy
date
Fri, 06 Feb 2009 12:49:48 -0800
changeset 216
58fcba61a77d
parent 1
9a66ca7c79fa
child 554
9d9f26857129
permissions
-rw-r--r--

6794071: Provide exception superclass for UnknownFooExceptions
Reviewed-by: jjg

     1 /*
     2  * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Sun designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Sun in the LICENSE file that accompanied this code.
    10  *
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14  * version 2 for more details (a copy is included in the LICENSE file that
    15  * accompanied this code).
    16  *
    17  * You should have received a copy of the GNU General Public License version
    18  * 2 along with this work; if not, write to the Free Software Foundation,
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  *
    21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    22  * CA 95054 USA or visit www.sun.com if you need additional information or
    23  * have any questions.
    24  */
    26 package javax.lang.model.type;
    29 import java.util.List;
    31 import javax.lang.model.element.ExecutableElement;
    34 /**
    35  * Represents the type of an executable.  An <i>executable</i>
    36  * is a method, constructor, or initializer.
    37  *
    38  * <p> The executable is
    39  * represented as when viewed as a method (or constructor or
    40  * initializer) of some reference type.
    41  * If that reference type is parameterized, then its actual
    42  * type arguments are substituted into any types returned by the methods of
    43  * this interface.
    44  *
    45  * @author Joseph D. Darcy
    46  * @author Scott Seligman
    47  * @author Peter von der Ah&eacute;
    48  * @see ExecutableElement
    49  * @since 1.6
    50  */
    51 public interface ExecutableType extends TypeMirror {
    53     /**
    54      * Returns the type variables declared by the formal type parameters
    55      * of this executable.
    56      *
    57      * @return the type variables declared by the formal type parameters,
    58      *          or an empty list if there are none
    59      */
    60     List<? extends TypeVariable> getTypeVariables();
    62     /**
    63      * Returns the return type of this executable.
    64      * Returns a {@link NoType} with kind {@link TypeKind#VOID VOID}
    65      * if this executable is not a method, or is a method that does not
    66      * return a value.
    67      *
    68      * @return the return type of this executable
    69      */
    70     TypeMirror getReturnType();
    72     /**
    73      * Returns the types of this executable's formal parameters.
    74      *
    75      * @return the types of this executable's formal parameters,
    76      *          or an empty list if there are none
    77      */
    78     List<? extends TypeMirror> getParameterTypes();
    80     /**
    81      * Returns the exceptions and other throwables listed in this
    82      * executable's {@code throws} clause.
    83      *
    84      * @return the exceptions and other throwables listed in this
    85      *          executable's {@code throws} clause,
    86      *          or an empty list if there are none.
    87      */
    88     List<? extends TypeMirror> getThrownTypes();
    89 }

mercurial