added -J option to preserve unmodified files in preexisting jarfile
[org.ibex.tool.git] / src / org / eclipse / jdt / internal / compiler / env / IBinaryType.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-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 resolved name of the enclosing type in the
23  * class file format as specified in section 4.2 of the Java 2 VM spec
24  * or null if the receiver is a top level type.
25  *
26  * For example, java.lang.String is java/lang/String.
27  */
28
29 char[] getEnclosingTypeName();
30 /**
31  * Answer the receiver's fields or null if the array is empty.
32  */
33
34 IBinaryField[] getFields();
35 /**
36  * Answer the resolved names of the receiver's interfaces in the
37  * class file format as specified in section 4.2 of the Java 2 VM spec
38  * or null if the array is empty.
39  *
40  * For example, java.lang.String is java/lang/String.
41  */
42
43 char[][] getInterfaceNames();
44 /**
45  * Answer the receiver's nested types or null if the array is empty.
46  *
47  * This nested type info is extracted from the inner class attributes.
48  * Ask the name environment to find a member type using its compound name.
49  */
50
51 // NOTE: The compiler examines the nested type info & ignores the local types
52 // so the local types do not have to be included.
53
54 IBinaryNestedType[] getMemberTypes();
55 /**
56  * Answer the receiver's methods or null if the array is empty.
57  */
58
59 IBinaryMethod[] getMethods();
60 /**
61  * Answer the resolved name of the type in the
62  * class file format as specified in section 4.2 of the Java 2 VM spec.
63  *
64  * For example, java.lang.String is java/lang/String.
65  */
66
67 char[] getName();
68
69 /**
70  * Answer the receiver's signature which describes the parameter &
71  * return types as specified in section 4.4.4 of the Java 2 VM spec 3rd edition.
72  * Returns null if none.
73  * 
74  * @return the receiver's signature, null if none
75  */
76 char[] getGenericSignature();
77
78 /**
79  * Answer the resolved name of the receiver's superclass in the
80  * class file format as specified in section 4.2 of the Java 2 VM spec
81  * or null if it does not have one.
82  *
83  * For example, java.lang.String is java/lang/String.
84  */
85
86 char[] getSuperclassName();
87 /**
88  * Answer the tagbits set according to the bits for annotations.
89  */
90 long getTagBits();
91 /**
92  * Answer true if the receiver is an anonymous class.
93  * false otherwise
94  */
95 boolean isAnonymous();
96
97 /**
98  * Answer true if the receiver is a local class.
99  * false otherwise
100  */
101 boolean isLocal();
102
103 /**
104  * Answer true if the receiver is a member class.
105  * false otherwise
106  */
107 boolean isMember(); 
108
109 /**
110  * Answer the source file attribute, or null if none.
111  *
112  * For example, "String.java"
113  */
114
115 char[] sourceFileName();
116
117 }