Class Departure

java.lang.Object
org.opengis.tools.taglet.AbstractTaglet
org.opengis.tools.taglet.Departure
All Implemented Interfaces:
Flushable, jdk.javadoc.doclet.Taglet

public final class Departure extends AbstractTaglet implements Flushable
The @departure tag for documenting the reasons for a departure from OGC/ISO standard. The first word after the tag must be the departure category, one of:
  • constraint - Some departure are required because of Java language constraint. The most common case is the mapping of the union construct, which exists in C/C++ but not in Java.
  • integration - the departure exists for better integration with standard Java library.
  • generalization - the departure exists in order to generalize an aspect of the specification.
  • historic - the departure exists for historical version (e.g. for compatibility with previous GeoAPI version).
  • rename - the departure is a method renaming for better compliance with Java usage, without any change in the method purpose, arguments and return type.
The remaining is the explanation as HTML text (no javadoc tags).
Since:
2.3
Version:
3.0.2
  • Nested Class Summary

    Nested classes/interfaces inherited from interface jdk.javadoc.doclet.Taglet

    jdk.javadoc.doclet.Taglet.Location
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final Map<String,String>
    The allowed departure categories.
    All departures declared in javadoc tags.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a @departure taglet.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Writes to the disk all information collected during the javadoc generation.
    Returns the name of this custom tag.
    void
    init(jdk.javadoc.doclet.DocletEnvironment env, jdk.javadoc.doclet.Doclet doclet)
    Invoked when the doclet initializes this taglet.
    toString(List<? extends com.sun.source.doctree.DocTree> tags, Element element)
    Given a list of DocTrees representing this custom tag, returns its string representation.

    Methods inherited from class org.opengis.tools.taglet.AbstractTaglet

    getAllowedLocations, isInlineTag, print, text

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jdk.javadoc.doclet.Taglet

    isBlockTag
  • Field Details

    • CATEGORIES

      private static final Map<String,String> CATEGORIES
      The allowed departure categories. Keys are the departure keyword, and values are descriptions of that departure category. The order of elements is the order of sections to be produced by
      invalid reference
      #summary
      .
    • departures

      private final Map<String,List<DepartureElement>> departures
      All departures declared in javadoc tags. The keys are the category, and the value is a list of departure for that category.
  • Constructor Details

    • Departure

      public Departure()
      Constructs a @departure taglet.
  • Method Details

    • init

      public void init(jdk.javadoc.doclet.DocletEnvironment env, jdk.javadoc.doclet.Doclet doclet)
      Invoked when the doclet initializes this taglet. This method registers this taglet for execution of the flush() method after the doclet finished to generate all the javadoc.
      Specified by:
      init in interface jdk.javadoc.doclet.Taglet
      Overrides:
      init in class AbstractTaglet
      Parameters:
      env - the environment in which the doclet and taglet are running.
      doclet - the doclet that instantiated this taglet.
    • getName

      public String getName()
      Returns the name of this custom tag.
      Specified by:
      getName in interface jdk.javadoc.doclet.Taglet
      Returns:
      the tag name.
    • toString

      public String toString(List<? extends com.sun.source.doctree.DocTree> tags, Element element)
      Given a list of DocTrees representing this custom tag, returns its string representation.
      Specified by:
      toString in interface jdk.javadoc.doclet.Taglet
      Parameters:
      tags - the tags to format.
      element - the element to which the enclosing comment belongs.
      Returns:
      a string representation of the given tags.
    • flush

      public void flush() throws IOException
      Writes to the disk all information collected during the javadoc generation. In the case of this taglet, this method generates a summary of all departures. This method does nothing if there is no reported departures.
      Specified by:
      flush in interface Flushable
      Throws:
      IOException - if an error occurred while writing the summary page.