A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / jdom / IDOMCompilationUnit.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.core.jdom;
12
13 /**
14  * Represents a Java compilation unit (<code>.java</code> source file). The
15  * corresponding syntactic unit is CompilationUnit (JLS2 7.3). Allowable child
16  * types for a compilation unit are <code>IDOMPackage</code>,
17  * <code>IDOMImport</code>, and <code>IDOMType</code>.
18  * <p>
19  * This interface is not intended to be implemented by clients.
20  * </p>
21  */
22 public interface IDOMCompilationUnit extends IDOMNode {
23         /**
24          * Returns the header comment for this compilation unit. The header comment
25          * appears before the first declaration in a compilation unit. The syntax
26          * for a comment corresponds to Comments (JLS2 3.7), <b>including</b>
27          * comment delimiters.
28          * 
29          * @return the header comment for this compilation unit, or
30          *         <code>null</code> if no header comment is present
31          */
32         public String getHeader();
33
34         /**
35          * The <code>IDOMCompilationNode</code> refinement of this
36          * <code>IDOMNode</code> method returns the name of this compilation unit.
37          * 
38          * <p>
39          * The name of a compilation unit is the name of the first top-level public
40          * type defined in the compilation unit, suffixed with ".java". For example,
41          * if the first top-level public type defined in this compilation unit has
42          * the name "Hanoi", then name of this compilation unit is "Hanoi.java".
43          * </p>
44          * 
45          * <p>
46          * In the absence of a public top-level type, the name of the first
47          * top-level type is used. In the absence of any type, the name of the
48          * compilation unit is <code>null</code>.
49          * </p>
50          * 
51          * @return the name of this compilation unit, or <code>null</code> if none
52          */
53         public String getName();
54
55         /**
56          * Sets the header comment for this compilation unit. The header comment
57          * appears before the first declaration in a compilation unit. The syntax
58          * for a comment corresponds to Comments (JLS2 3.7), <b>including</b>
59          * comment delimiters.
60          * 
61          * @param comment
62          *            the header comment for this compilation unit, or
63          *            <code>null</code> if indicating no header comment
64          */
65         public void setHeader(String comment);
66
67         /**
68          * The <code>IDOMCompilationNode</code> refinement of this
69          * <code>IDOMNode</code> method has no effect (the name is computed from
70          * the types declared within it).
71          */
72         public void setName(String name);
73 }