duke@1: /* jjg@1521: * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as ohair@554: * published by the Free Software Foundation. Oracle designates this duke@1: * particular file as subject to the "Classpath" exception as provided ohair@554: * by Oracle in the LICENSE file that accompanied this code. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. duke@1: */ duke@1: duke@1: package com.sun.javadoc; duke@1: duke@1: /** duke@1: * Represents a method or constructor of a java class. duke@1: * duke@1: * @since 1.2 duke@1: * @author Robert Field duke@1: */ duke@1: public interface ExecutableMemberDoc extends MemberDoc { duke@1: duke@1: /** duke@1: * Return exceptions this method or constructor throws. duke@1: * If the type of the exception is a type variable, return the duke@1: * ClassDoc of its erasure. duke@1: * duke@1: *

The thrownExceptions method cannot duke@1: * accommodate certain generic type constructs. The duke@1: * thrownExceptionTypes method should be used duke@1: * instead. duke@1: * duke@1: * @return an array of ClassDoc[] representing the exceptions duke@1: * thrown by this method. duke@1: * @see #thrownExceptionTypes duke@1: */ duke@1: ClassDoc[] thrownExceptions(); duke@1: duke@1: /** duke@1: * Return exceptions this method or constructor throws. duke@1: * duke@1: * @return an array representing the exceptions thrown by this method. duke@1: * Each array element is either a ClassDoc or a duke@1: * TypeVariable. duke@1: * @since 1.5 duke@1: */ duke@1: Type[] thrownExceptionTypes(); duke@1: duke@1: /** duke@1: * Return true if this method is native duke@1: */ duke@1: boolean isNative(); duke@1: duke@1: /** duke@1: * Return true if this method is synchronized duke@1: */ duke@1: boolean isSynchronized(); duke@1: duke@1: /** duke@1: * Return true if this method was declared to take a variable number duke@1: * of arguments. duke@1: * duke@1: * @since 1.5 duke@1: */ duke@1: public boolean isVarArgs(); duke@1: duke@1: /** duke@1: * Get argument information. duke@1: * duke@1: * @see Parameter duke@1: * duke@1: * @return an array of Parameter, one element per argument duke@1: * in the order the arguments are present. duke@1: */ duke@1: Parameter[] parameters(); duke@1: duke@1: /** bpatel@1686: * Get the receiver type of this executable element. bpatel@1686: * bpatel@1686: * @return the receiver type of this executable element. bpatel@1686: * @since 1.8 bpatel@1686: */ bpatel@1686: Type receiverType(); bpatel@1686: bpatel@1686: /** duke@1: * Return the throws tags in this method. duke@1: * jjg@1326: * @return an array of ThrowTag containing all @exception jjg@1326: * and @throws tags. duke@1: */ duke@1: ThrowsTag[] throwsTags(); duke@1: duke@1: /** duke@1: * Return the param tags in this method, excluding the type duke@1: * parameter tags. duke@1: * jjg@1326: * @return an array of ParamTag containing all @param tags duke@1: * corresponding to the parameters of this method. duke@1: */ duke@1: ParamTag[] paramTags(); duke@1: duke@1: /** duke@1: * Return the type parameter tags in this method. duke@1: * jjg@1326: * @return an array of ParamTag containing all @param tags duke@1: * corresponding to the type parameters of this method. duke@1: * @since 1.5 duke@1: */ duke@1: ParamTag[] typeParamTags(); duke@1: duke@1: /** duke@1: * Get the signature. It is the parameter list, type is qualified. duke@1: * For instance, for a method mymethod(String x, int y), duke@1: * it will return (java.lang.String,int). duke@1: */ duke@1: String signature(); duke@1: duke@1: /** duke@1: * get flat signature. all types are not qualified. duke@1: * return a String, which is the flat signiture of this member. duke@1: * It is the parameter list, type is not qualified. duke@1: * For instance, for a method mymethod(String x, int y), duke@1: * it will return (String, int). duke@1: */ duke@1: String flatSignature(); duke@1: duke@1: /** duke@1: * Return the formal type parameters of this method or constructor. duke@1: * Return an empty array if this method or constructor is not generic. duke@1: * duke@1: * @return the formal type parameters of this method or constructor. duke@1: * @since 1.5 duke@1: */ duke@1: TypeVariable[] typeParameters(); duke@1: }