com.sun.tools.javac.code
Class Symbol.PackageSymbol

java.lang.Object
  extended by com.sun.tools.javac.code.Symbol
      extended by com.sun.tools.javac.code.Symbol.TypeSymbol
          extended by com.sun.tools.javac.code.Symbol.PackageSymbol
All Implemented Interfaces:
Element, PackageElement, TypeParameterElement
Enclosing class:
Symbol

public static class Symbol.PackageSymbol
extends Symbol.TypeSymbol
implements PackageElement

A class for package symbols


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.tools.javac.code.Symbol
Symbol.ClassSymbol, Symbol.Completer, Symbol.CompletionFailure, Symbol.DelegatedSymbol, Symbol.MethodSymbol, Symbol.OperatorSymbol, Symbol.PackageSymbol, Symbol.TypeSymbol, Symbol.VarSymbol
 
Field Summary
 Name fullname
           
 Scope members_field
           
 Symbol.ClassSymbol package_info
           
 
Fields inherited from class com.sun.tools.javac.code.Symbol
attributes_field, completer, erasure_field, flags_field, kind, name, owner, type
 
Constructor Summary
Symbol.PackageSymbol(Name name, Symbol owner)
           
Symbol.PackageSymbol(Name name, Type type, Symbol owner)
           
 
Method Summary
<R,P> R
accept(ElementVisitor<R,P> v, P p)
          Applies a visitor to this element.
 boolean exists()
          A package "exists" if a type or package that exists has been seen within it.
 long flags()
          An accessor method for the flags of this symbol.
 List<Attribute.Compound> getAnnotationMirrors()
          An accessor method for the attributes of this symbol.
 Symbol getEnclosingElement()
          Returns the innermost element within which this element is, loosely speaking, enclosed.
 ElementKind getKind()
          Returns the kind of this element.
 Name getQualifiedName()
          The fully qualified name of this symbol.
 boolean isUnnamed()
          Returns true is this is an unnamed package and false otherwise.
 Scope members()
          If this is a class or package, its members, otherwise null.
 java.lang.String toString()
          The Java source which this symbol represents.
 
Methods inherited from class com.sun.tools.javac.code.Symbol.TypeSymbol
formFlatName, formFullName, getBounds, getEnclosedElements, getGenericElement, precedes
 
Methods inherited from class com.sun.tools.javac.code.Symbol
asMemberOf, asType, attribute, clone, complete, enclClass, erasure, externalType, flatName, getAnnotation, getModifiers, getSimpleName, getTypeParameters, hasOuterInstance, isConstructor, isEnclosedBy, isInheritedIn, isInner, isInterface, isLocal, isMemberOf, isStatic, isSubClass, location, location, outermostClass, overrides, packge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.lang.model.element.Element
asType, equals, getAnnotation, getEnclosedElements, getModifiers, getSimpleName, hashCode
 

Field Detail

members_field

public Scope members_field

fullname

public Name fullname

package_info

public Symbol.ClassSymbol package_info
Constructor Detail

Symbol.PackageSymbol

public Symbol.PackageSymbol(Name name,
                            Type type,
                            Symbol owner)

Symbol.PackageSymbol

public Symbol.PackageSymbol(Name name,
                            Symbol owner)
Method Detail

toString

public java.lang.String toString()
Description copied from class: Symbol
The Java source which this symbol represents. A description of this symbol; overrides Object.

Overrides:
toString in class Symbol

getQualifiedName

public Name getQualifiedName()
Description copied from class: Symbol
The fully qualified name of this symbol. This is the same as the symbol's name except for class symbols, which are handled separately.

Specified by:
getQualifiedName in interface PackageElement
Overrides:
getQualifiedName in class Symbol
Returns:
the fully qualified name of this package, or an empty name if this is an unnamed package

isUnnamed

public boolean isUnnamed()
Description copied from interface: PackageElement
Returns true is this is an unnamed package and false otherwise.

Specified by:
isUnnamed in interface PackageElement
Returns:
true is this is an unnamed package and false otherwise

members

public Scope members()
Description copied from class: Symbol
If this is a class or package, its members, otherwise null.

Overrides:
members in class Symbol

flags

public long flags()
Description copied from class: Symbol
An accessor method for the flags of this symbol. Flags of class symbols should be accessed through the accessor method to make sure that the class symbol is loaded.

Overrides:
flags in class Symbol

getAnnotationMirrors

public List<Attribute.Compound> getAnnotationMirrors()
Description copied from class: Symbol
An accessor method for the attributes of this symbol. Attributes of class symbols should be accessed through the accessor method to make sure that the class symbol is loaded.

Specified by:
getAnnotationMirrors in interface Element
Overrides:
getAnnotationMirrors in class Symbol
Returns:
the annotations directly present on this element; an empty list if there are none
See Also:
ElementFilter

exists

public boolean exists()
A package "exists" if a type or package that exists has been seen within it.

Overrides:
exists in class Symbol

getKind

public ElementKind getKind()
Description copied from interface: Element
Returns the kind of this element.

Specified by:
getKind in interface Element
Overrides:
getKind in class Symbol.TypeSymbol
Returns:
the kind of this element

getEnclosingElement

public Symbol getEnclosingElement()
Description copied from interface: Element
Returns the innermost element within which this element is, loosely speaking, enclosed.

Specified by:
getEnclosingElement in interface Element
Overrides:
getEnclosingElement in class Symbol
Returns:
the enclosing element, or null if there is none
See Also:
Elements.getPackageOf(javax.lang.model.element.Element)

accept

public <R,P> R accept(ElementVisitor<R,P> v,
                      P p)
Description copied from interface: Element
Applies a visitor to this element.

Specified by:
accept in interface Element
Overrides:
accept in class Symbol.TypeSymbol
Type Parameters:
R - the return type of the visitor's methods
P - the type of the additional parameter to the visitor's methods
Parameters:
v - the visitor operating on this element
p - additional parameter to the visitor
Returns:
a visitor-specified result


Copyright © 2009. All Rights Reserved.