org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc.SearchableDocumentation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaxb2-maven-plugin Show documentation
Show all versions of jaxb2-maven-plugin Show documentation
Mojo's JAXB-2 Maven plugin is used to create an object graph
from XSDs based on the JAXB 2.x implementation and to generate XSDs
from JAXB annotated Java classes.
package org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import java.util.SortedMap;
import java.util.SortedSet;
/**
* Specification for a Map of SortableLocations correlated to their respective JavaDocData.
* To simplify searching and accessing within the JavaDocData, the paths of each SortableLocation
* is exposed for searching and listing.
*
* @author Lennart Jörelid, jGuru Europe AB
* @since 2.0
*/
public interface SearchableDocumentation {
/**
* Retrieves all unique SortableLocation paths within this SearchableDocumentation.
*
* @return all unique SortableLocation paths within this SearchableDocumentation.
* The result may be empty, but will never be {@code null}.
*/
SortedSet getPaths();
/**
* Convenience method to acquire the JavaDocData for a SortableLocation with the supplied path.
*
* @param path A non-null path for which the harvested JavaDocData should be retrieved.
* @return The JavaDocData matching the SortableLocation with the supplied path, or {@code null} if no
* SortableLocation with the supplied path was found within this SearchableDocumentation.
*/
JavaDocData getJavaDoc(String path);
/**
* Convenience method to acquire the SortableLocation corresponding to the given path.
*
* @param path The path of a SortableLocation, which is retrieved by a call to its {@code toString()} method.
* @param The SortableLocation subtype.
* @return the SortableLocation corresponding to the given path, or {@code null} if this SearchableDocumentation
* does not contain a SortableLocation with the provided path.
*/
T getLocation(String path);
/**
* The full map relating each SortableLocation subclass to its corresponding JavaDocData.
*
* @return The full map relating each SortableLocation subclass to its corresponding JavaDocData. Never null.
*/
SortedMap getAll();
/**
* Convenience method which retrieves a SortedMap relating all SortableLocations of a particular type
* to their JavaDocData, respectively.
*
* @param 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.
* @param The SortableLocation subtype for which all JavaDocData should be retrieved.
* @return 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 {@code null}.
*/
SortedMap getAll(Class type);
}