Class PackageLocation
java.lang.Object
org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.location.PackageLocation
- All Implemented Interfaces:
Comparable<SortableLocation>,SortableLocation
- Direct Known Subclasses:
ClassLocation
Comparable path structure to locate a particular package within compilation unit.
- Since:
- 2.0
- Author:
- Lennart Jörelid, jGuru Europe AB
-
Constructor Summary
ConstructorsConstructorDescriptionPackageLocation(String packageName) Creates a new PackageLocation with the supplied package name. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(SortableLocation that) Compares the string representations of this PackageLocation and the supplied SortableLocation.booleanNote: Packages cannot be renamed from a JAXB annotation.Retrieves the name of the package potentially holding JavaDoc.getPath()Retrieves the path of this SortableLocation.inthashCode()booleanisEqualToPath(String path) Validates if the supplied path is equal to this SortableLocation.toString()
-
Constructor Details
-
PackageLocation
Creates a new PackageLocation with the supplied package name.- Parameters:
packageName- The name of the package potentially holding JavaDoc. Cannot benull.
-
-
Method Details
-
getPackageName
Retrieves the name of the package potentially holding JavaDoc.- Returns:
- The name of the package potentially holding JavaDoc. Can be empty, but never
null.
-
equals
-
hashCode
public int hashCode() -
getAnnotationRenamedTo
Note: Packages cannot be renamed from a JAXB annotation. Retrieves the value of the name attribute provided by a JAXB annotation, implying that the XSD type should use another name than the default.- Specified by:
getAnnotationRenamedToin interfaceSortableLocation- Returns:
- the value of the name attribute provided by a JAXB annotation relevant to this
SortableLocation. - See Also:
-
getPath
Retrieves the path of this SortableLocation. The path must uniquely correspond to each unique SortableLocation, implying that SortableLocations could be sorted and compared for equality using the path property.- Specified by:
getPathin interfaceSortableLocation- Returns:
- the path of this SortableLocation. Never null.
-
toString
-
isEqualToPath
Validates if the supplied path is equal to this SortableLocation.- Specified by:
isEqualToPathin interfaceSortableLocation- Parameters:
path- The non-null path to compare to this SortableLocation.- Returns:
trueif this SortableLocation is equal to the supplied path.
-
compareTo
Compares the string representations of this PackageLocation and the supplied SortableLocation.
- Specified by:
compareToin interfaceComparable<SortableLocation>
-