View Javadoc

1   /*
2    * Copyright (c) 2001-2003 The XDoclet team
3    * All rights reserved.
4    */
5   package xjavadoc;
6   
7   import java.util.List;
8   
9   /***
10   * Common functionality for methods and constructors.
11   *
12   * @author    Ara Abrahamian
13   * @author    Aslak Hellesøy
14   * @created   9. mars 2003
15   */
16  public interface XExecutableMember extends XMember
17  {
18  	boolean isNative();
19  	boolean isSynchronized();
20  
21  	/***
22  	 * Returns the parameters.
23  	 *
24  	 * @return   a Collection of {@link XParameter}.
25  	 */
26  	List getParameters();
27  
28  	/***
29  	 * Returns the thrown exception classes.
30  	 *
31  	 * @return   a Collection of {@link XClass}.
32  	 */
33  	List getThrownExceptions();
34  
35  	/***
36  	 * Return true if the member throws the specified exception in its throws
37  	 * block.
38  	 *
39  	 * @param exception_class_name
40  	 * @return                      true if the member throws the exception
41  	 */
42  	boolean throwsException( String exception_class_name );
43  
44  	/***
45  	 * Return true if this is a constructor.
46  	 *
47  	 * @return   true if this is a constructor.
48  	 */
49  	boolean isConstructor();
50  
51  	/***
52  	 * Returns the signature.
53  	 *
54  	 * @return       the signature.
55  	 * @deprecated   use getSignature(boolean)
56  	 */
57  	String getSignature();
58  
59  	/***
60  	 * Returns the signature. E.g. <code>(java.lang.String,int)</code> or <code>(java.lang.String foo,int bar)</code>
61  	 * .
62  	 *
63  	 * @param withParam  whether or not to include the parameter names in the
64  	 *      signature.
65  	 * @return           the signature.
66  	 */
67  	String getSignature( boolean withParam );
68  	String getNameWithSignature();
69  	String getNameWithSignature( boolean withParam );
70  
71  	/***
72  	 * Returns the parameters as a comma separated list of classes. E.g. a method
73  	 * with signature <code>(java.lang.String,int)</code> would return <code>java.lang.String.class, java.lang.Integer.TYPE</code>
74  	 * .
75  	 *
76  	 * @return   comma separated list of types for all parameters.
77  	 */
78  	String getParameterTypes();
79  }