public interface IDOMCompilationUnit extends IDOMNode
Java-like extensions
).
The corresponding syntactic unit is CompilationUnit (JLS2 7.3).
Allowable child types for a compilation unit are IDOMPackage
, IDOMImport
,
and IDOMType
.COMPILATION_UNIT, FIELD, IMPORT, INITIALIZER, METHOD, PACKAGE, TYPE
Modifier and Type | Method and Description |
---|---|
String |
getHeader()
Deprecated.
Returns the header comment for this compilation unit.
|
String |
getName()
Deprecated.
The
IDOMCompilationNode refinement of this IDOMNode
method returns the name of this compilation unit. |
void |
setHeader(String comment)
Deprecated.
Sets the header comment for this compilation unit.
|
void |
setName(String name)
Deprecated.
The
IDOMCompilationNode refinement of this IDOMNode
method has no effect (the name is computed from the types declared within it). |
addChild, canHaveChildren, clone, getCharacters, getChild, getChildren, getContents, getFirstChild, getJavaElement, getNextNode, getNodeType, getParent, getPreviousNode, insertSibling, isAllowableChild, isSignatureEqual, remove
String getHeader()
null
if
no header comment is presentString getName()
IDOMCompilationNode
refinement of this IDOMNode
method returns the name of this compilation unit.
The name of a compilation unit is the name of the first top-level public type
defined in the compilation unit, suffixed with one of the
Java-like extensions
. For example, if the first
top-level public type defined in this compilation unit has the name "Hanoi",
then name of this compilation unit is "Hanoi.java".
In the absence of a public top-level type, the name of the first top-level
type is used. In the absence of any type, the name of the compilation unit
is null
.
void setHeader(String comment)
comment
- the header comment for this compilation unit, or null
if
indicating no header comment
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.