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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.jdt.internal.compiler.env;
13 public interface ISourceType extends IGenericType {
16 * Answer the source end position of the type's declaration.
18 int getDeclarationSourceEnd();
21 * Answer the source start position of the type's declaration.
23 int getDeclarationSourceStart();
26 * Answer the enclosing type
27 * or null if the receiver is a top level type.
29 ISourceType getEnclosingType();
32 * Answer the receiver's fields or null if the array is empty.
34 * NOTE: Multiple fields with the same name can exist in the result.
36 ISourceField[] getFields();
39 * Answer the receiver's imports or null if the array is empty.
41 * An import is a qualified, dot separated name.
42 * For example, java.util.Hashtable or java.lang.*.
43 * A static import used 'static.' as its first fragment, for
44 * example: static.java.util.Hashtable.*
46 ISourceImport[] getImports();
49 * Answer the unresolved names of the receiver's interfaces
50 * or null if the array is empty.
52 * A name is a simple name or a qualified, dot separated name.
53 * For example, Hashtable or java.util.Hashtable.
55 char[][] getInterfaceNames();
58 * Answer the receiver's member types
59 * or null if the array is empty.
61 ISourceType[] getMemberTypes();
64 * Answer the receiver's methods or null if the array is empty.
66 * NOTE: Multiple methods with the same name & parameter types can exist in the result.
68 ISourceMethod[] getMethods();
71 * Answer the simple source name of the receiver.
76 * Answer the source end position of the type's name.
78 int getNameSourceEnd();
81 * Answer the source start position of the type's name.
83 int getNameSourceStart();
86 * Answer the qualified name of the receiver's package separated by periods
87 * or null if its the default package.
89 * For example, {java.util.Hashtable}.
91 char[] getPackageName();
94 * Answer the unresolved name of the receiver's superclass
95 * or null if it does not have one.
97 * The name is a simple name or a qualified, dot separated name.
98 * For example, Hashtable or java.util.Hashtable.
100 char[] getSuperclassName();