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