public final class PackageAndClass
extends java.lang.Object
Constructor and Description |
---|
PackageAndClass(java.lang.String packageName,
java.lang.String className)
Makes a new package and class definition.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
className() |
PackageAndClass |
createInnerClass(java.lang.String name) |
boolean |
equals(java.lang.Object o) |
static PackageAndClass |
fromString(java.lang.String qualifiedName)
Extracts a package and class definition from a string.
|
int |
hashCode() |
PackageAndClass |
inPackage(PackageAndClass parent) |
PackageAndClass |
inPackage(java.lang.String qualifiedName) |
java.lang.String |
mangledName() |
java.lang.String |
packageName() |
java.lang.String |
toJVMRef() |
java.lang.String |
toJVMType() |
java.lang.String |
toString() |
public PackageAndClass(java.lang.String packageName, java.lang.String className)
packageName
- the package name.className
- the class name.public static PackageAndClass fromString(java.lang.String qualifiedName)
qualifiedName
- a qualified name.public PackageAndClass createInnerClass(java.lang.String name)
PackageAndClass
identifying an inner class of this class.public PackageAndClass inPackage(java.lang.String qualifiedName)
qualifiedName
- the qualified name of the new package.PackageAndClass
representing the same class in another package.public PackageAndClass inPackage(PackageAndClass parent)
parent
- the PackageAndClass
representing the new package.PackageAndClass
representing the same class in another package.public java.lang.String packageName()
public java.lang.String className()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toJVMType()
foo.Bar
gives foo/Bar
.public java.lang.String toJVMRef()
foo.Bar
gives
Lfoo/Bar;
public java.lang.String mangledName()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object