Tue, 22 Oct 2013 17:42:10 -0700
8027119: Cleanup javadoc comments for taglet API
Reviewed-by: mduigou
duke@1 | 1 | /* |
jjg@1521 | 2 | * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
duke@1 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 4 | * |
duke@1 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@1 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ohair@554 | 7 | * published by the Free Software Foundation. Oracle designates this |
duke@1 | 8 | * particular file as subject to the "Classpath" exception as provided |
ohair@554 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
duke@1 | 10 | * |
duke@1 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 15 | * accompanied this code). |
duke@1 | 16 | * |
duke@1 | 17 | * You should have received a copy of the GNU General Public License version |
duke@1 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 20 | * |
ohair@554 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@554 | 22 | * or visit www.oracle.com if you need additional information or have any |
ohair@554 | 23 | * questions. |
duke@1 | 24 | */ |
duke@1 | 25 | |
duke@1 | 26 | package com.sun.javadoc; |
duke@1 | 27 | |
duke@1 | 28 | /** |
duke@1 | 29 | * Represents a method or constructor of a java class. |
duke@1 | 30 | * |
duke@1 | 31 | * @since 1.2 |
duke@1 | 32 | * @author Robert Field |
duke@1 | 33 | */ |
duke@1 | 34 | public interface ExecutableMemberDoc extends MemberDoc { |
duke@1 | 35 | |
duke@1 | 36 | /** |
duke@1 | 37 | * Return exceptions this method or constructor throws. |
duke@1 | 38 | * If the type of the exception is a type variable, return the |
duke@1 | 39 | * <code>ClassDoc</code> of its erasure. |
duke@1 | 40 | * |
duke@1 | 41 | * <p> <i>The <code>thrownExceptions</code> method cannot |
duke@1 | 42 | * accommodate certain generic type constructs. The |
duke@1 | 43 | * <code>thrownExceptionTypes</code> method should be used |
duke@1 | 44 | * instead.</i> |
duke@1 | 45 | * |
duke@1 | 46 | * @return an array of ClassDoc[] representing the exceptions |
duke@1 | 47 | * thrown by this method. |
duke@1 | 48 | * @see #thrownExceptionTypes |
duke@1 | 49 | */ |
duke@1 | 50 | ClassDoc[] thrownExceptions(); |
duke@1 | 51 | |
duke@1 | 52 | /** |
duke@1 | 53 | * Return exceptions this method or constructor throws. |
duke@1 | 54 | * |
duke@1 | 55 | * @return an array representing the exceptions thrown by this method. |
duke@1 | 56 | * Each array element is either a <code>ClassDoc</code> or a |
duke@1 | 57 | * <code>TypeVariable</code>. |
duke@1 | 58 | * @since 1.5 |
duke@1 | 59 | */ |
duke@1 | 60 | Type[] thrownExceptionTypes(); |
duke@1 | 61 | |
duke@1 | 62 | /** |
duke@1 | 63 | * Return true if this method is native |
duke@1 | 64 | */ |
duke@1 | 65 | boolean isNative(); |
duke@1 | 66 | |
duke@1 | 67 | /** |
duke@1 | 68 | * Return true if this method is synchronized |
duke@1 | 69 | */ |
duke@1 | 70 | boolean isSynchronized(); |
duke@1 | 71 | |
duke@1 | 72 | /** |
duke@1 | 73 | * Return true if this method was declared to take a variable number |
duke@1 | 74 | * of arguments. |
duke@1 | 75 | * |
duke@1 | 76 | * @since 1.5 |
duke@1 | 77 | */ |
duke@1 | 78 | public boolean isVarArgs(); |
duke@1 | 79 | |
duke@1 | 80 | /** |
duke@1 | 81 | * Get argument information. |
duke@1 | 82 | * |
duke@1 | 83 | * @see Parameter |
duke@1 | 84 | * |
duke@1 | 85 | * @return an array of Parameter, one element per argument |
duke@1 | 86 | * in the order the arguments are present. |
duke@1 | 87 | */ |
duke@1 | 88 | Parameter[] parameters(); |
duke@1 | 89 | |
duke@1 | 90 | /** |
bpatel@1686 | 91 | * Get the receiver type of this executable element. |
bpatel@1686 | 92 | * |
bpatel@1686 | 93 | * @return the receiver type of this executable element. |
bpatel@1686 | 94 | * @since 1.8 |
bpatel@1686 | 95 | */ |
bpatel@1686 | 96 | Type receiverType(); |
bpatel@1686 | 97 | |
bpatel@1686 | 98 | /** |
duke@1 | 99 | * Return the throws tags in this method. |
duke@1 | 100 | * |
jjg@1326 | 101 | * @return an array of ThrowTag containing all <code>@exception</code> |
jjg@1326 | 102 | * and <code>@throws</code> tags. |
duke@1 | 103 | */ |
duke@1 | 104 | ThrowsTag[] throwsTags(); |
duke@1 | 105 | |
duke@1 | 106 | /** |
duke@1 | 107 | * Return the param tags in this method, excluding the type |
duke@1 | 108 | * parameter tags. |
duke@1 | 109 | * |
jjg@1326 | 110 | * @return an array of ParamTag containing all <code>@param</code> tags |
duke@1 | 111 | * corresponding to the parameters of this method. |
duke@1 | 112 | */ |
duke@1 | 113 | ParamTag[] paramTags(); |
duke@1 | 114 | |
duke@1 | 115 | /** |
duke@1 | 116 | * Return the type parameter tags in this method. |
duke@1 | 117 | * |
jjg@1326 | 118 | * @return an array of ParamTag containing all <code>@param</code> tags |
duke@1 | 119 | * corresponding to the type parameters of this method. |
duke@1 | 120 | * @since 1.5 |
duke@1 | 121 | */ |
duke@1 | 122 | ParamTag[] typeParamTags(); |
duke@1 | 123 | |
duke@1 | 124 | /** |
duke@1 | 125 | * Get the signature. It is the parameter list, type is qualified. |
duke@1 | 126 | * For instance, for a method <code>mymethod(String x, int y)</code>, |
duke@1 | 127 | * it will return <code>(java.lang.String,int)</code>. |
duke@1 | 128 | */ |
duke@1 | 129 | String signature(); |
duke@1 | 130 | |
duke@1 | 131 | /** |
duke@1 | 132 | * get flat signature. all types are not qualified. |
duke@1 | 133 | * return a String, which is the flat signiture of this member. |
duke@1 | 134 | * It is the parameter list, type is not qualified. |
duke@1 | 135 | * For instance, for a method <code>mymethod(String x, int y)</code>, |
duke@1 | 136 | * it will return <code>(String, int)</code>. |
duke@1 | 137 | */ |
duke@1 | 138 | String flatSignature(); |
duke@1 | 139 | |
duke@1 | 140 | /** |
duke@1 | 141 | * Return the formal type parameters of this method or constructor. |
duke@1 | 142 | * Return an empty array if this method or constructor is not generic. |
duke@1 | 143 | * |
duke@1 | 144 | * @return the formal type parameters of this method or constructor. |
duke@1 | 145 | * @since 1.5 |
duke@1 | 146 | */ |
duke@1 | 147 | TypeVariable[] typeParameters(); |
duke@1 | 148 | } |