Class MethodLocation
java.lang.Object
org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.location.PackageLocation
org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.location.ClassLocation
org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.location.FieldLocation
org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.location.MethodLocation
- All Implemented Interfaces:
Comparable<SortableLocation>
,SortableLocation
Comparable path structure to locate a particular method within compilation unit.
- Since:
- 2.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPath()
Always appends the effective className to the path from the superclassPackageLocation
.int
hashCode()
boolean
toString()
Methods inherited from class org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.location.FieldLocation
getAnnotationRenamedTo, getMemberName
Methods inherited from class org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.location.ClassLocation
getClassName
Methods inherited from class org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.location.PackageLocation
compareTo, equals, getPackageName, isEqualToPath
-
Field Details
-
NO_PARAMETERS
Signature for a method without any parameters.- See Also:
-
PARAMETER_SEPARATOR
Separator for a method's parameters.- See Also:
-
parameters
-
-
Constructor Details
-
MethodLocation
public MethodLocation(String packageName, String className, String classXmlName, String memberName, String memberXmlName, List<com.thoughtworks.qdox.model.JavaParameter> parameters) Creates a new MethodLocation with the supplied package, class and member names.- Parameters:
packageName
- The name of the package for a class potentially holding JavaDoc. Cannot benull
.className
- The (simple) name of a class. Cannot be null or empty.classXmlName
- The name given as theXmlType.name()
value of an annotation placed on the Class, ornull
if none is provided.memberName
- The name of a (method or) field. Cannot be null or empty.memberXmlName
- The name given as theXmlElement.name()
orXmlAttribute.name()
value of an annotation placed on this Field, ornull
if none is provided.parameters
- The names of the types which are parameters to this method.
-
-
Method Details
-
getPath
Always appends the effective className to the path from the superclassPackageLocation
. If theClassLocation.getAnnotationRenamedTo()
method returns a non-null value, that value is the effective className. Otherwise, theClassLocation.getClassName()
method is used as the effective className. This is to handle renames such as provided in aXmlType
annotation'sXmlType.name()
attribute value.- Specified by:
getPath
in interfaceSortableLocation
- Overrides:
getPath
in classFieldLocation
- Returns:
- the path of the PackageLocation superclass, appended with the effective className.
- See Also:
-
toString
- Overrides:
toString
in classFieldLocation
-
hashCode
public int hashCode()- Overrides:
hashCode
in classFieldLocation
-
getParametersAsString
- Returns:
- The parameters, concatenated into a String.
-
hasNoParameters
public boolean hasNoParameters()- Returns:
- True if this MethodLocation has no parameters.
-