|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.core.dom.ASTNode
org.eclipse.jdt.core.dom.PackageDeclaration
Package declaration AST node type. For JLS2:
PackageDeclaration: package Name ;For JLS3, annotations and doc comment were added:
PackageDeclaration: [ Javadoc ] { Annotation } package Name ;
Field Summary | |
---|---|
static ChildListPropertyDescriptor |
ANNOTATIONS_PROPERTY
The "annotations" structural property of this node type (added in JLS3 API). |
static ChildPropertyDescriptor |
JAVADOC_PROPERTY
The "javadoc" structural property of this node type. |
static ChildPropertyDescriptor |
NAME_PROPERTY
The "name" structural property of this node type. |
Method Summary | |
---|---|
List |
annotations()
Returns the live ordered list of annotations of this package declaration (added in JLS3 API). |
Javadoc |
getJavadoc()
Returns the doc comment node. |
Name |
getName()
Returns the package name of this package declaration. |
static List |
propertyDescriptors(int apiLevel)
Returns a list of structural property descriptors for this node type. |
IPackageBinding |
resolveBinding()
Resolves and returns the binding for the package declared in this package declaration. |
void |
setJavadoc(Javadoc docComment)
Sets or clears the doc comment node. |
void |
setName(Name name)
Sets the package name of this package declaration to the given name. |
Methods inherited from class org.eclipse.jdt.core.dom.ASTNode |
---|
accept, copySubtree, copySubtrees, delete, equals, getAST, getFlags, getLength, getLocationInParent, getNodeType, getParent, getProperty, getRoot, getStartPosition, getStructuralProperty, nodeClassForType, properties, setFlags, setProperty, setSourceRange, setStructuralProperty, structuralPropertiesForType, subtreeBytes, subtreeMatch, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ChildPropertyDescriptor JAVADOC_PROPERTY
public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY
public static final ChildPropertyDescriptor NAME_PROPERTY
Method Detail |
public static List propertyDescriptors(int apiLevel)
apiLevel
- the API level; one of the
AST.JLS*
constants
StructuralPropertyDescriptor
)public List annotations()
Annotation
)
UnsupportedOperationException
- if this operation is used in
a JLS2 ASTpublic Javadoc getJavadoc()
null
if none
UnsupportedOperationException
- if this operation is used in
a JLS2 ASTpublic void setJavadoc(Javadoc docComment)
docComment
- the doc comment node, or null
if none
IllegalArgumentException
- if the doc comment string is invalid
UnsupportedOperationException
- if this operation is used in
a JLS2 ASTpublic Name getName()
public void setName(Name name)
name
- the new package name
IllegalArgumentException
- if`:
public IPackageBinding resolveBinding()
Note that bindings are generally unavailable unless requested when the AST is being built.
null
if the binding cannot be
resolved
|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |