Class JavaDocExtractor.ReadOnlySearchableDocumentation
- java.lang.Object
-
- org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.JavaDocExtractor.ReadOnlySearchableDocumentation
-
- All Implemented Interfaces:
SearchableDocumentation
- Enclosing class:
- JavaDocExtractor
private class JavaDocExtractor.ReadOnlySearchableDocumentation extends java.lang.Object implements SearchableDocumentation
Standard read-only SearchableDocumentation implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.TreeMap<java.lang.String,SortableLocation>
keyMap
private java.util.SortedMap<? extends SortableLocation,JavaDocData>
valueMap
-
Constructor Summary
Constructors Constructor Description ReadOnlySearchableDocumentation(java.util.SortedMap<SortableLocation,JavaDocData> valueMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.SortedMap<SortableLocation,JavaDocData>
getAll()
The full map relating each SortableLocation subclass to its corresponding JavaDocData.<T extends SortableLocation>
java.util.SortedMap<T,JavaDocData>getAll(java.lang.Class<T> type)
Convenience method which retrieves a SortedMap relating all SortableLocations of a particular type to their JavaDocData, respectively.JavaDocData
getJavaDoc(java.lang.String path)
Convenience method to acquire the JavaDocData for a SortableLocation with the supplied path.<T extends SortableLocation>
TgetLocation(java.lang.String path)
Convenience method to acquire the SortableLocation corresponding to the given path.java.util.SortedSet<java.lang.String>
getPaths()
Retrieves all unique SortableLocation paths within this SearchableDocumentation.
-
-
-
Field Detail
-
keyMap
private java.util.TreeMap<java.lang.String,SortableLocation> keyMap
-
valueMap
private java.util.SortedMap<? extends SortableLocation,JavaDocData> valueMap
-
-
Constructor Detail
-
ReadOnlySearchableDocumentation
ReadOnlySearchableDocumentation(java.util.SortedMap<SortableLocation,JavaDocData> valueMap)
-
-
Method Detail
-
getPaths
public java.util.SortedSet<java.lang.String> getPaths()
Retrieves all unique SortableLocation paths within this SearchableDocumentation.- Specified by:
getPaths
in interfaceSearchableDocumentation
- Returns:
- all unique SortableLocation paths within this SearchableDocumentation.
The result may be empty, but will never be
null
.
-
getJavaDoc
public JavaDocData getJavaDoc(java.lang.String path)
Convenience method to acquire the JavaDocData for a SortableLocation with the supplied path.- Specified by:
getJavaDoc
in interfaceSearchableDocumentation
- Parameters:
path
- A non-null path for which the harvested JavaDocData should be retrieved.- Returns:
- The JavaDocData matching the SortableLocation with the supplied path, or
null
if no SortableLocation with the supplied path was found within this SearchableDocumentation.
-
getLocation
public <T extends SortableLocation> T getLocation(java.lang.String path)
Convenience method to acquire the SortableLocation corresponding to the given path.- Specified by:
getLocation
in interfaceSearchableDocumentation
- Type Parameters:
T
- The SortableLocation subtype.- Parameters:
path
- The path of a SortableLocation, which is retrieved by a call to itstoString()
method.- Returns:
- the SortableLocation corresponding to the given path, or
null
if this SearchableDocumentation does not contain a SortableLocation with the provided path.
-
getAll
public java.util.SortedMap<SortableLocation,JavaDocData> getAll()
The full map relating each SortableLocation subclass to its corresponding JavaDocData.- Specified by:
getAll
in interfaceSearchableDocumentation
- Returns:
- The full map relating each SortableLocation subclass to its corresponding JavaDocData. Never null.
-
getAll
public <T extends SortableLocation> java.util.SortedMap<T,JavaDocData> getAll(java.lang.Class<T> type)
Convenience method which retrieves a SortedMap relating all SortableLocations of a particular type to their JavaDocData, respectively.- Specified by:
getAll
in interfaceSearchableDocumentation
- Type Parameters:
T
- The SortableLocation subtype for which all JavaDocData should be retrieved.- Parameters:
type
- The exact type of SortableLocation which should be filtered from the result and returned in the form of a SortedMap, along with its respective JavaDocData.- Returns:
- a SortedMap relating all SortableLocations of a particular (exact) type (i.e. any subclass types will
not be returned) to their JavaDocData, respectively.
May return empty Maps, but never
null
.
-
-