01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.compiler.env;
11:
12: // clinit methods (synthetics too?) can be returned from IBinaryType>>getMethods()
13: // BUT do not have to be... the compiler will ignore them when building the binding.
14: // The synthetic argument of a member type's constructor (ie. the first arg of a non-static
15: // member type) is also ignored by the compiler, BUT in this case it must be included
16: // in the constructor's signature.
17:
18: public interface IBinaryMethod extends IGenericMethod {
19:
20: /**
21: * Answer the runtime visible and invisible annotations for this method or null if none.
22: */
23: IBinaryAnnotation[] getAnnotations();
24:
25: /**
26: * Return {@link ClassSignature} for a Class {@link java.lang.Class}.
27: * Return {@link org.eclipse.jdt.internal.compiler.impl.Constant} for compile-time constant of primitive type, as well as String literals.
28: * Return {@link EnumConstantSignature} if value is an enum constant.
29: * Return {@link IBinaryAnnotation} for annotation type.
30: * Return {@link Object}[] for array type.
31: *
32: * @return default value of this annotation method
33: */
34: Object getDefaultValue();
35:
36: /**
37: * Answer the resolved names of the exception types in the
38: * class file format as specified in section 4.2 of the Java 2 VM spec
39: * or null if the array is empty.
40: *
41: * For example, java.lang.String is java/lang/String.
42: */
43: char[][] getExceptionTypeNames();
44:
45: /**
46: * Answer the receiver's signature which describes the parameter &
47: * return types as specified in section 4.4.4 of the Java 2 VM spec.
48: */
49: char[] getGenericSignature();
50:
51: /**
52: * Answer the receiver's method descriptor which describes the parameter &
53: * return types as specified in section 4.4.3 of the Java 2 VM spec.
54: *
55: * For example:
56: * - int foo(String) is (Ljava/lang/String;)I
57: * - Object[] foo(int) is (I)[Ljava/lang/Object;
58: */
59: char[] getMethodDescriptor();
60:
61: /**
62: * Answer the annotations on the <code>index</code>th parameter or null if none
63: * @param index the index of the parameter of interest
64: */
65: IBinaryAnnotation[] getParameterAnnotations(int index);
66:
67: /**
68: * Answer the name of the method.
69: *
70: * For a constructor, answer <init> & <clinit> for a clinit method.
71: */
72: char[] getSelector();
73:
74: /**
75: * Answer the tagbits set according to the bits for annotations.
76: */
77: long getTagBits();
78:
79: /**
80: * Answer whether the receiver represents a class initializer method.
81: */
82: boolean isClinit();
83: }
|