src/share/classes/com/sun/javadoc/ExecutableMemberDoc.java

changeset 1
9a66ca7c79fa
child 554
9d9f26857129
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/classes/com/sun/javadoc/ExecutableMemberDoc.java	Sat Dec 01 00:00:00 2007 +0000
     1.3 @@ -0,0 +1,140 @@
     1.4 +/*
     1.5 + * Copyright 1998-2006 Sun Microsystems, Inc.  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.  Sun designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    1.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
    1.26 + * have any 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 +     * Return the throws tags in this method.
    1.95 +     *
    1.96 +     * @return an array of ThrowTag containing all <code>&#64exception</code>
    1.97 +     * and <code>&#64throws</code> tags.
    1.98 +     */
    1.99 +    ThrowsTag[] throwsTags();
   1.100 +
   1.101 +    /**
   1.102 +     * Return the param tags in this method, excluding the type
   1.103 +     * parameter tags.
   1.104 +     *
   1.105 +     * @return an array of ParamTag containing all <code>&#64param</code> tags
   1.106 +     * corresponding to the parameters of this method.
   1.107 +     */
   1.108 +    ParamTag[] paramTags();
   1.109 +
   1.110 +    /**
   1.111 +     * Return the type parameter tags in this method.
   1.112 +     *
   1.113 +     * @return an array of ParamTag containing all <code>&#64param</code> tags
   1.114 +     * corresponding to the type parameters of this method.
   1.115 +     * @since 1.5
   1.116 +     */
   1.117 +    ParamTag[] typeParamTags();
   1.118 +
   1.119 +    /**
   1.120 +     * Get the signature. It is the parameter list, type is qualified.
   1.121 +     *      For instance, for a method <code>mymethod(String x, int y)</code>,
   1.122 +     *      it will return <code>(java.lang.String,int)</code>.
   1.123 +     */
   1.124 +    String signature();
   1.125 +
   1.126 +    /**
   1.127 +     * get flat signature.  all types are not qualified.
   1.128 +     *      return a String, which is the flat signiture of this member.
   1.129 +     *      It is the parameter list, type is not qualified.
   1.130 +     *      For instance, for a method <code>mymethod(String x, int y)</code>,
   1.131 +     *      it will return <code>(String, int)</code>.
   1.132 +     */
   1.133 +    String flatSignature();
   1.134 +
   1.135 +    /**
   1.136 +     * Return the formal type parameters of this method or constructor.
   1.137 +     * Return an empty array if this method or constructor is not generic.
   1.138 +     *
   1.139 +     * @return the formal type parameters of this method or constructor.
   1.140 +     * @since 1.5
   1.141 +     */
   1.142 +    TypeVariable[] typeParameters();
   1.143 +}

mercurial