KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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 import org.eclipse.jdt.core.compiler.CharOperation;
14
15 public interface IBinaryType extends IGenericType {
16
17     char[][] NoInterface = CharOperation.NO_CHAR_CHAR;
18     IBinaryNestedType[] NoNestedType = new IBinaryNestedType[0];
19     IBinaryField[] NoField = new IBinaryField[0];
20     IBinaryMethod[] NoMethod = new IBinaryMethod[0];
21 /**
22  * Answer the runtime visible and invisible annotations for this type or null if none.
23  */

24
25 IBinaryAnnotation[] getAnnotations();
26 /**
27  * Answer the resolved name of the enclosing type in the
28  * class file format as specified in section 4.2 of the Java 2 VM spec
29  * or null if the receiver is a top level type.
30  *
31  * For example, java.lang.String is java/lang/String.
32  */

33
34 char[] getEnclosingTypeName();
35 /**
36  * Answer the receiver's fields or null if the array is empty.
37  */

38
39 IBinaryField[] getFields();
40 /**
41  * Answer the receiver's signature which describes the parameter &
42  * return types as specified in section 4.4.4 of the Java 2 VM spec 3rd edition.
43  * Returns null if none.
44  *
45  * @return the receiver's signature, null if none
46  */

47 char[] getGenericSignature();
48 /**
49  * Answer the resolved names of the receiver's interfaces in the
50  * class file format as specified in section 4.2 of the Java 2 VM spec
51  * or null if the array is empty.
52  *
53  * For example, java.lang.String is java/lang/String.
54  */

55
56 char[][] getInterfaceNames();
57 /**
58  * Answer the receiver's nested types or null if the array is empty.
59  *
60  * This nested type info is extracted from the inner class attributes.
61  * Ask the name environment to find a member type using its compound name.
62  */

63
64 // NOTE: The compiler examines the nested type info & ignores the local types
65
// so the local types do not have to be included.
66

67 IBinaryNestedType[] getMemberTypes();
68 /**
69  * Answer the receiver's methods or null if the array is empty.
70  */

71
72 IBinaryMethod[] getMethods();
73
74 /**
75  * Answer the resolved name of the type in the
76  * class file format as specified in section 4.2 of the Java 2 VM spec.
77  *
78  * For example, java.lang.String is java/lang/String.
79  */

80 char[] getName();
81
82 /**
83  * Answer the simple name of the type in the class file.
84  * For member A$B, will answer B.
85  * For anonymous will answer null.
86  */

87 char[] getSourceName();
88
89 /**
90  * Answer the resolved name of the receiver's superclass in the
91  * class file format as specified in section 4.2 of the Java 2 VM spec
92  * or null if it does not have one.
93  *
94  * For example, java.lang.String is java/lang/String.
95  */

96
97 char[] getSuperclassName();
98 /**
99  * Answer the tagbits set according to the bits for annotations.
100  */

101 long getTagBits();
102 /**
103  * Answer true if the receiver is an anonymous class.
104  * false otherwise
105  */

106 boolean isAnonymous();
107
108 /**
109  * Answer true if the receiver is a local class.
110  * false otherwise
111  */

112 boolean isLocal();
113
114 /**
115  * Answer true if the receiver is a member class.
116  * false otherwise
117  */

118 boolean isMember();
119
120 /**
121  * Answer the source file attribute, or null if none.
122  *
123  * For example, "String.java"
124  */

125
126 char[] sourceFileName();
127
128 }
129
Popular Tags