|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDOMCompilationUnit
Represents a Java compilation unit (source file with one of the
Java-like extensions
).
The corresponding syntactic unit is CompilationUnit (JLS2 7.3).
Allowable child types for a compilation unit are IDOMPackage
, IDOMImport
,
and IDOMType
.
Field Summary |
---|
Fields inherited from interface org.eclipse.jdt.core.jdom.IDOMNode |
---|
COMPILATION_UNIT, FIELD, IMPORT, INITIALIZER, METHOD, PACKAGE, TYPE |
Method Summary | |
---|---|
java.lang.String |
getHeader()
Deprecated. Returns the header comment for this compilation unit. |
java.lang.String |
getName()
Deprecated. The IDOMCompilationNode refinement of this IDOMNode
method returns the name of this compilation unit. |
void |
setHeader(java.lang.String comment)
Deprecated. Sets the header comment for this compilation unit. |
void |
setName(java.lang.String name)
Deprecated. The IDOMCompilationNode refinement of this IDOMNode
method has no effect (the name is computed from the types declared within it). |
Methods inherited from interface org.eclipse.jdt.core.jdom.IDOMNode |
---|
addChild, canHaveChildren, clone, getCharacters, getChild, getChildren, getContents, getFirstChild, getJavaElement, getNextNode, getNodeType, getParent, getPreviousNode, insertSibling, isAllowableChild, isSignatureEqual, remove |
Method Detail |
---|
java.lang.String getHeader()
null
if
no header comment is presentjava.lang.String 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
.
getName
in interface IDOMNode
null
if nonevoid setHeader(java.lang.String comment)
comment
- the header comment for this compilation unit, or null
if
indicating no header commentvoid setName(java.lang.String name)
IDOMCompilationNode
refinement of this IDOMNode
method has no effect (the name is computed from the types declared within it).
setName
in interface IDOMNode
name
- the given name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |