polyglot.types
Interface Package

All Superinterfaces:
java.lang.Cloneable, Copy, Declaration, Named, Qualifier, java.io.Serializable, TypeObject
All Known Subinterfaces:
UnknownPackage
All Known Implementing Classes:
Package_c, UnknownPackage_c

public interface Package
extends Qualifier, Named, Declaration

An Package represents a Java package.


Method Summary
 boolean packageEquals(Package p)
          Return true if this package is equivalent to p.
 boolean packageEqualsImpl(Package p)
          Return true if this package is equivalent to p.
 Package prefix()
          The package's outer package.
 void print(CodeWriter w)
          Pretty-print this package name to w.
 Resolver resolver()
          A resolver to access member packages and classes of the package.
 java.lang.String translate(Resolver c)
          Return a string that is the translation of this package.
 
Methods inherited from interface polyglot.types.Qualifier
isPackage, isType, toPackage, toType
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, isCanonical, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 
Methods inherited from interface polyglot.types.Named
fullName, name
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, isCanonical, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 
Methods inherited from interface polyglot.types.Declaration
declaration, setDeclaration
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, isCanonical, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

prefix

Package prefix()
The package's outer package.


translate

java.lang.String translate(Resolver c)
Return a string that is the translation of this package.

Parameters:
c - A resolver in which to look up the package.

packageEquals

boolean packageEquals(Package p)
Return true if this package is equivalent to p.


packageEqualsImpl

boolean packageEqualsImpl(Package p)
Return true if this package is equivalent to p.


resolver

Resolver resolver()
A resolver to access member packages and classes of the package.


print

void print(CodeWriter w)
Pretty-print this package name to w.