APIdia Launch Partner
Top Description Methods
com.sun.source.tree

public Interface PackageTree

extends Tree
Known Direct Implementers
com.sun.tools.javac.tree.JCTree.JCPackageDecl
Imports
java.util.List

Represents the package declaration.
Author
Paul Govereau
Since
9
Java Language Specification
7.3 Compilation Units, 7.4 Package Declarations

Method Summary

Modifier and TypeMethod and Description
public List<? extends AnnotationTree>

Returns:

the annotations
getAnnotations
()

Returns the annotations associated with this package declaration.

public ExpressionTree

Returns:

the name
getPackageName
()

Returns the name of the package being declared.

Inherited from com.sun.source.tree.Tree:
acceptgetKind

Method Detail

getAnnotationsback to summary
public List<? extends AnnotationTree> getAnnotations()

Returns the annotations associated with this package declaration.

Returns:List<? extends AnnotationTree>

the annotations

getPackageNameback to summary
public ExpressionTree getPackageName()

Returns the name of the package being declared.

Returns:ExpressionTree

the name