public class ClassLocation extends PackageLocation
Constructor and Description |
---|
ClassLocation(String packageName,
String className,
String classXmlName)
Creates a new ClassLocation with the supplied package and class names.
|
Modifier and Type | Method and Description |
---|---|
String |
getAnnotationRenamedTo()
Note: Packages cannot be renamed from a JAXB annotation.
|
String |
getClassName()
Retrieves the simple class name for the class potentially holding JavaDoc.
|
String |
getPath()
Always appends the effective className to the path from the superclass
PackageLocation . |
int |
hashCode() |
String |
toString() |
compareTo, equals, getPackageName, isEqualToPath
public ClassLocation(String packageName, String className, String classXmlName)
packageName
- The name of the package for a class potentially holding JavaDoc. Cannot be null
.classXmlName
- The name given as the XmlType.name()
value of an annotation placed on the Class,
or null
if none is provided.className
- The (simple) name of a class. Cannot be null or empty.public String getClassName()
null
or empty.null
or empty.public String getPath()
PackageLocation
.
If the getAnnotationRenamedTo()
method returns a non-null value, that value is the effective className.
Otherwise, the getClassName()
method is used as the effective className.
This is to handle renames such as provided in a XmlType
annotation's
XmlType.name()
attribute value.getPath
in interface SortableLocation
getPath
in class PackageLocation
XmlType
,
XmlAttribute.name()
,
XmlElement.name()
public String getAnnotationRenamedTo()
getAnnotationRenamedTo
in interface SortableLocation
getAnnotationRenamedTo
in class PackageLocation
SortableLocation
.XmlElement.name()
,
XmlAttribute.name()
,
XmlType.name()
public int hashCode()
hashCode
in class PackageLocation
public String toString()
toString
in class PackageLocation
Copyright © 2005–2018 MojoHaus. All rights reserved.