|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.types.TypeObject_c
polyglot.types.Package_c
public class Package_c
An PackageType
represents a package type. It may or may
not be fully qualified. Package types are never canonical and never
primitive.
Field Summary | |
---|---|
protected Package |
decl
|
protected java.lang.String |
fullname
The full name is computed lazily from the prefix and name. |
protected Resolver |
memberCache
|
protected java.lang.String |
name
|
protected Package |
prefix
|
Fields inherited from class polyglot.types.TypeObject_c |
---|
position, ts |
Constructor Summary | |
---|---|
protected |
Package_c()
Used for deserializing types. |
|
Package_c(TypeSystem ts)
|
|
Package_c(TypeSystem ts,
Package prefix,
java.lang.String name)
|
|
Package_c(TypeSystem ts,
java.lang.String name)
|
Method Summary | |
---|---|
java.lang.Object |
copy()
|
Declaration |
declaration()
Get the original declaration. |
boolean |
equalsImpl(TypeObject o)
Default implementation is pointer equality. |
java.lang.String |
fullName()
Full dotted-name of the type object. |
int |
hashCode()
|
boolean |
isCanonical()
Return true if the type object contains no unknown/ambiguous types. |
boolean |
isPackage()
Return true if the qualifier is a package. |
boolean |
isType()
Return true if the qualifier is a type. |
java.lang.String |
name()
Simple name of the type object. |
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. |
void |
setDeclaration(Declaration decl)
Set the original declaration. |
Package |
toPackage()
Cast the qualifier to a package, or return null. |
java.lang.String |
toString()
|
Type |
toType()
Cast the qualifier to a type, or return null. |
java.lang.String |
translate(Resolver c)
Return a string that is the translation of this package. |
Methods inherited from class polyglot.types.TypeObject_c |
---|
equals, position, typeSystem |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface polyglot.types.TypeObject |
---|
position, typeSystem |
Methods inherited from interface polyglot.types.TypeObject |
---|
position, typeSystem |
Methods inherited from interface polyglot.types.TypeObject |
---|
position, typeSystem |
Field Detail |
---|
protected Package prefix
protected java.lang.String name
protected java.lang.String fullname
protected transient Resolver memberCache
protected Package decl
Constructor Detail |
---|
protected Package_c()
public Package_c(TypeSystem ts)
public Package_c(TypeSystem ts, java.lang.String name)
public Package_c(TypeSystem ts, Package prefix, java.lang.String name)
Method Detail |
---|
public Resolver resolver()
Package
resolver
in interface Package
public java.lang.Object copy()
copy
in interface Copy
copy
in class TypeObject_c
public Declaration declaration()
Declaration
declaration
in interface Declaration
public void setDeclaration(Declaration decl)
Declaration
setDeclaration
in interface Declaration
public boolean equalsImpl(TypeObject o)
TypeObject_c
equalsImpl
in interface TypeObject
equalsImpl
in class TypeObject_c
TypeObject_c.equalsImpl(TypeObject)
,
Object.hashCode()
public final boolean packageEquals(Package p)
Package
p
.
packageEquals
in interface Package
public boolean packageEqualsImpl(Package p)
Package
p
.
packageEqualsImpl
in interface Package
public boolean isType()
Qualifier
isType
in interface Qualifier
public boolean isPackage()
Qualifier
isPackage
in interface Qualifier
public Type toType()
Qualifier
toType
in interface Qualifier
public Package toPackage()
Qualifier
toPackage
in interface Qualifier
public Package prefix()
Package
prefix
in interface Package
public java.lang.String name()
Named
name
in interface Named
public java.lang.String translate(Resolver c)
Package
translate
in interface Package
c
- A resolver in which to look up the package.public java.lang.String fullName()
Named
fullName
in interface Named
public java.lang.String toString()
toString
in class java.lang.Object
public void print(CodeWriter w)
Package
print
in interface Package
public int hashCode()
hashCode
in class TypeObject_c
public boolean isCanonical()
TypeObject
isCanonical
in interface TypeObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |