Class Format.Annotated<A>

java.lang.Object
eu.bandm.tools.format.Format
eu.bandm.tools.format.Format.Annotated<A>
All Implemented Interfaces:
Formattable, Serializable, Cloneable
Direct Known Subclasses:
ReferenceFormat
Enclosing class:
Format

public static class Format.Annotated<A> extends Format
Foreseen for data annotations. Required for the metajava reference format.
See Also:
  • Field Details

    • format

      protected final Format format
      The printable contents which shall be annotated.
    • annotation

      @Opt protected final A annotation
      The annotation value.
  • Constructor Details

    • Annotated

      public Annotated(Format format, @Opt A annotation)
      Constructor used by the factory methods.
    • Annotated

      public Annotated(Format format, int indent, @Opt A annotation)
      Constructor used only internally by the cloning methods.
  • Method Details

    • doprint

      protected void doprint(Format.FormatPrinter v)
      Description copied from class: Format
      Over-ridden by all sub-classes of Format, for performing the adquate print operations. To be printed is the raison d'ĂȘtre of Format objects. These methods do not use the Visitor/Matcher framework, but direct method invocation and basic method dispatch for descending to child nodes.
      Specified by:
      doprint in class Format
    • indent

      public Format.Annotated<A> indent(int i)
      Description copied from class: Format
      Returns a clone of this with the new value of Format.indent. (The built-in "clone()" functionality cannot be used, since field "indent" is final).
      Specified by:
      indent in class Format
    • debugPrefix

      public String debugPrefix(int n)
      Description copied from class: Format
      Overridden by subclasses to deliver a printable representation for debugging purpose.
      Specified by:
      debugPrefix in class Format
      Parameters:
      n - the maximal number of characters
    • getFormat

      public Format getFormat()
      Getter used by diagnosis.
    • getAnnotation

      public A getAnnotation()
      Getter used by diagnosis.