1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/classes/com/sun/javadoc/ExecutableMemberDoc.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,148 @@ 1.4 +/* 1.5 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Oracle designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Oracle in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.25 + * or visit www.oracle.com if you need additional information or have any 1.26 + * questions. 1.27 + */ 1.28 + 1.29 +package com.sun.javadoc; 1.30 + 1.31 +/** 1.32 + * Represents a method or constructor of a java class. 1.33 + * 1.34 + * @since 1.2 1.35 + * @author Robert Field 1.36 + */ 1.37 +public interface ExecutableMemberDoc extends MemberDoc { 1.38 + 1.39 + /** 1.40 + * Return exceptions this method or constructor throws. 1.41 + * If the type of the exception is a type variable, return the 1.42 + * <code>ClassDoc</code> of its erasure. 1.43 + * 1.44 + * <p> <i>The <code>thrownExceptions</code> method cannot 1.45 + * accommodate certain generic type constructs. The 1.46 + * <code>thrownExceptionTypes</code> method should be used 1.47 + * instead.</i> 1.48 + * 1.49 + * @return an array of ClassDoc[] representing the exceptions 1.50 + * thrown by this method. 1.51 + * @see #thrownExceptionTypes 1.52 + */ 1.53 + ClassDoc[] thrownExceptions(); 1.54 + 1.55 + /** 1.56 + * Return exceptions this method or constructor throws. 1.57 + * 1.58 + * @return an array representing the exceptions thrown by this method. 1.59 + * Each array element is either a <code>ClassDoc</code> or a 1.60 + * <code>TypeVariable</code>. 1.61 + * @since 1.5 1.62 + */ 1.63 + Type[] thrownExceptionTypes(); 1.64 + 1.65 + /** 1.66 + * Return true if this method is native 1.67 + */ 1.68 + boolean isNative(); 1.69 + 1.70 + /** 1.71 + * Return true if this method is synchronized 1.72 + */ 1.73 + boolean isSynchronized(); 1.74 + 1.75 + /** 1.76 + * Return true if this method was declared to take a variable number 1.77 + * of arguments. 1.78 + * 1.79 + * @since 1.5 1.80 + */ 1.81 + public boolean isVarArgs(); 1.82 + 1.83 + /** 1.84 + * Get argument information. 1.85 + * 1.86 + * @see Parameter 1.87 + * 1.88 + * @return an array of Parameter, one element per argument 1.89 + * in the order the arguments are present. 1.90 + */ 1.91 + Parameter[] parameters(); 1.92 + 1.93 + /** 1.94 + * Get the receiver type of this executable element. 1.95 + * 1.96 + * @return the receiver type of this executable element. 1.97 + * @since 1.8 1.98 + */ 1.99 + Type receiverType(); 1.100 + 1.101 + /** 1.102 + * Return the throws tags in this method. 1.103 + * 1.104 + * @return an array of ThrowTag containing all <code>@exception</code> 1.105 + * and <code>@throws</code> tags. 1.106 + */ 1.107 + ThrowsTag[] throwsTags(); 1.108 + 1.109 + /** 1.110 + * Return the param tags in this method, excluding the type 1.111 + * parameter tags. 1.112 + * 1.113 + * @return an array of ParamTag containing all <code>@param</code> tags 1.114 + * corresponding to the parameters of this method. 1.115 + */ 1.116 + ParamTag[] paramTags(); 1.117 + 1.118 + /** 1.119 + * Return the type parameter tags in this method. 1.120 + * 1.121 + * @return an array of ParamTag containing all <code>@param</code> tags 1.122 + * corresponding to the type parameters of this method. 1.123 + * @since 1.5 1.124 + */ 1.125 + ParamTag[] typeParamTags(); 1.126 + 1.127 + /** 1.128 + * Get the signature. It is the parameter list, type is qualified. 1.129 + * For instance, for a method <code>mymethod(String x, int y)</code>, 1.130 + * it will return <code>(java.lang.String,int)</code>. 1.131 + */ 1.132 + String signature(); 1.133 + 1.134 + /** 1.135 + * get flat signature. all types are not qualified. 1.136 + * return a String, which is the flat signiture of this member. 1.137 + * It is the parameter list, type is not qualified. 1.138 + * For instance, for a method <code>mymethod(String x, int y)</code>, 1.139 + * it will return <code>(String, int)</code>. 1.140 + */ 1.141 + String flatSignature(); 1.142 + 1.143 + /** 1.144 + * Return the formal type parameters of this method or constructor. 1.145 + * Return an empty array if this method or constructor is not generic. 1.146 + * 1.147 + * @return the formal type parameters of this method or constructor. 1.148 + * @since 1.5 1.149 + */ 1.150 + TypeVariable[] typeParameters(); 1.151 +}