001 /*
002 * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation. Sun designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Sun in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022 * CA 95054 USA or visit www.sun.com if you need additional information or
023 * have any questions.
024 */
025
026 package com.sun.mirror.declaration;
027
028
029 import java.util.Collection;
030
031 import com.sun.mirror.type.ReferenceType;
032
033
034 /**
035 * Represents a method or constructor of a class or interface.
036 *
037 * @author Joseph D. Darcy
038 * @author Scott Seligman
039 * @since 1.5
040 */
041
042 public interface ExecutableDeclaration extends MemberDeclaration {
043
044 /**
045 * Returns <tt>true</tt> if this method or constructor accepts a variable
046 * number of arguments.
047 *
048 * @return <tt>true</tt> if this method or constructor accepts a variable
049 * number of arguments
050 */
051 boolean isVarArgs();
052
053 /**
054 * Returns the formal type parameters of this method or constructor.
055 * They are returned in declaration order.
056 *
057 * @return the formal type parameters of this method or constructor,
058 * or an empty collection if there are none
059 */
060 Collection<TypeParameterDeclaration> getFormalTypeParameters();
061
062 /**
063 * Returns the formal parameters of this method or constructor.
064 * They are returned in declaration order.
065 *
066 * @return the formal parameters of this method or constructor,
067 * or an empty collection if there are none
068 */
069 Collection<ParameterDeclaration> getParameters();
070
071 /**
072 * Returns the exceptions and other throwables listed in this
073 * method or constructor's <tt>throws</tt> clause.
074 *
075 * @return the exceptions and other throwables listed in the
076 * <tt>throws</tt> clause, or an empty collection if there are none
077 */
078 Collection<ReferenceType> getThrownTypes();
079 }