improved PHP parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / env / ISourceType.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 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 net.sourceforge.phpdt.internal.compiler.env;
12
13 import net.sourceforge.phpdt.internal.compiler.env.ISourceImport;
14
15 public interface ISourceType extends IGenericType {
16 /**
17  * Answer the source end position of the type's declaration.
18  */
19
20 int getDeclarationSourceEnd();
21 /**
22  * Answer the source start position of the type's declaration.
23  */
24
25 int getDeclarationSourceStart();
26 /**
27  * Answer the enclosing type
28  * or null if the receiver is a top level type.
29  */
30
31 ISourceType getEnclosingType();
32 /**
33  * Answer the receiver's fields or null if the array is empty.
34  *
35  * NOTE: Multiple fields with the same name can exist in the result.
36  */
37
38 ISourceField[] getFields();
39 ///**
40 // * Answer the unresolved names of the receiver's imports
41 // * or null if the array is empty.
42 // *
43 // * An import is a qualified, dot separated name.
44 // * For example, java.util.Hashtable or java.lang.*.
45 // */
46 //
47 //char[][] getImports();
48 /**
49  * Answer the receiver's imports or null if the array is empty.
50  *
51  * An import is a qualified, dot separated name.
52  * For example, java.util.Hashtable or java.lang.*.
53  * A static import used 'static.' as its first fragment, for
54  * example: static.java.util.Hashtable.*
55  */
56 char[][] getImports();
57
58 /**
59  * Answer the unresolved names of the receiver's interfaces
60  * or null if the array is empty.
61  *
62  * A name is a simple name or a qualified, dot separated name.
63  * For example, Hashtable or java.util.Hashtable.
64  */
65
66 char[][] getInterfaceNames();
67 /**
68  * Answer the receiver's member types
69  * or null if the array is empty.
70  */
71
72 ISourceType[] getMemberTypes();
73 /**
74  * Answer the receiver's methods or null if the array is empty.
75  *
76  * NOTE: Multiple methods with the same name & parameter types can exist in the result.
77  */
78
79 ISourceMethod[] getMethods();
80 /**
81  * Answer the simple source name of the receiver.
82  */
83
84 char[] getName();
85 /**
86  * Answer the source end position of the type's name.
87  */
88
89 int getNameSourceEnd();
90 /**
91  * Answer the source start position of the type's name.
92  */
93
94 int getNameSourceStart();
95 /**
96  * Answer the qualified name of the receiver's package separated by periods
97  * or null if its the default package.
98  *
99  * For example, {java.util.Hashtable}.
100  */
101
102 char[] getPackageName();
103 /**
104  * Answer the qualified name of the receiver.
105  *
106  * The name is a qualified, dot separated name.
107  * For example, java.util.Hashtable.
108  */
109
110 char[] getQualifiedName();
111 /**
112  * Answer the unresolved name of the receiver's superclass
113  * or null if it does not have one.
114  *
115  * The name is a simple name or a qualified, dot separated name.
116  * For example, Hashtable or java.util.Hashtable.
117  */
118
119 char[] getSuperclassName();
120 }