KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > compiler > env > IBinaryMethod


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.compiler.env;
12
13 // clinit methods (synthetics too?) can be returned from IBinaryType>>getMethods()
14
// BUT do not have to be... the compiler will ignore them when building the binding.
15
// The synthetic argument of a member type's constructor (ie. the first arg of a non-static
16
// member type) is also ignored by the compiler, BUT in this case it must be included
17
// in the constructor's signature.
18

19 public interface IBinaryMethod extends IGenericMethod {
20
21 /**
22  * Answer the runtime visible and invisible annotations for this method or null if none.
23  */

24 IBinaryAnnotation[] getAnnotations();
25
26 /**
27  * Return {@link ClassSignature} for a Class {@link java.lang.Class}.
28  * Return {@link org.eclipse.jdt.internal.compiler.impl.Constant} for compile-time constant of primitive type, as well as String literals.
29  * Return {@link EnumConstantSignature} if value is an enum constant.
30  * Return {@link IBinaryAnnotation} for annotation type.
31  * Return {@link Object}[] for array type.
32  *
33  * @return default value of this annotation method
34  */

35 Object JavaDoc getDefaultValue();
36
37 /**
38  * Answer the resolved names of the exception types in the
39  * class file format as specified in section 4.2 of the Java 2 VM spec
40  * or null if the array is empty.
41  *
42  * For example, java.lang.String is java/lang/String.
43  */

44 char[][] getExceptionTypeNames();
45
46 /**
47  * Answer the receiver's signature which describes the parameter &
48  * return types as specified in section 4.4.4 of the Java 2 VM spec.
49  */

50 char[] getGenericSignature();
51
52 /**
53  * Answer the receiver's method descriptor which describes the parameter &
54  * return types as specified in section 4.4.3 of the Java 2 VM spec.
55  *
56  * For example:
57  * - int foo(String) is (Ljava/lang/String;)I
58  * - Object[] foo(int) is (I)[Ljava/lang/Object;
59  */

60 char[] getMethodDescriptor();
61
62 /**
63  * Answer the annotations on the <code>index</code>th parameter or null if none
64  * @param index the index of the parameter of interest
65  */

66 IBinaryAnnotation[] getParameterAnnotations(int index);
67
68 /**
69  * Answer the name of the method.
70  *
71  * For a constructor, answer <init> & <clinit> for a clinit method.
72  */

73 char[] getSelector();
74
75 /**
76  * Answer the tagbits set according to the bits for annotations.
77  */

78 long getTagBits();
79
80 /**
81  * Answer whether the receiver represents a class initializer method.
82  */

83 boolean isClinit();
84 }
85
Popular Tags