A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / env / ICompilationUnit.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 org.eclipse.core.resources.IResource;
14
15 /**
16  * This interface denotes a compilation unit, providing its name and content.
17  */
18 public interface ICompilationUnit extends IDependent {
19         /**
20          * Answer the contents of the compilation unit.
21          * 
22          * In normal use, the contents are requested twice. Once during the initial
23          * lite parsing step, then again for the more detailed parsing step.
24          */
25         char[] getContents();
26
27         /**
28          * Answer the name of the top level public type. For example, {Hashtable}.
29          */
30         char[] getMainTypeName();
31
32         /**
33          * Answer the name of the package according to the directory structure or
34          * null if package consistency checks should be ignored. For example, {java,
35          * lang}.
36          */
37         char[][] getPackageName();
38
39         IResource getResource();
40
41 }