|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpolyglot.ext.jl.types.TypeObject_c
polyglot.ext.jl.types.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 java.lang.String |
fullname
The full name is computed lazily from the prefix and name. |
protected java.lang.String |
name
|
protected Package |
prefix
|
| Fields inherited from class polyglot.ext.jl.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 | |
boolean |
equalsImpl(TypeObject o)
Return true iff this type object is the same as t. |
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. |
Package |
prefix()
The package's outer package. |
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.ext.jl.types.TypeObject_c |
copy, 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.util.Copy |
copy |
| Field Detail |
protected Package prefix
protected java.lang.String name
protected java.lang.String fullname
| 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 boolean isType()
Qualifier
isType in interface Qualifierpublic boolean isPackage()
Qualifier
isPackage in interface Qualifierpublic Type toType()
Qualifier
toType in interface Qualifierpublic Package toPackage()
Qualifier
toPackage in interface Qualifierpublic Package prefix()
Package
prefix in interface Packagepublic java.lang.String name()
Named
name in interface Namedpublic java.lang.String translate(Resolver c)
Package
translate in interface Packagec - A resolver in which to look up the package.public java.lang.String fullName()
Named
fullName in interface Namedpublic java.lang.String toString()
public int hashCode()
hashCode in class TypeObject_cpublic boolean equalsImpl(TypeObject o)
TypeObjectt.
All Polyglot extensions should attempt to maintain pointer
equality between TypeObjects. If this cannot be done,
extensions can override TypeObject_c.equalsImpl(), and
don't forget to override hashCode().
equalsImpl in interface TypeObjectequalsImpl in class TypeObject_cpublic boolean isCanonical()
TypeObject
isCanonical in interface TypeObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||