Class IHTMirror

  • All Implemented Interfaces:
    AnnotationMirror

    public class IHTMirror
    extends java.lang.Object
    implements AnnotationMirror
    An Annotation Mirror Class is an object whose sole responsibility is to capture and store the exact data supplied by a single use of a Java annotation. When a user writes an annotation in source code, all parameter values, flags, arrays, and embedded elements are transferred into a corresponding Mirror instance. The mirror therefore becomes a stable, programmatic representation of that specific annotation usage, allowing the Java Doc Upgrader Documentation System to inspect and utilize the annotation's data during the upgrade process.

    The data fields in a Mirror Class are populated by inspecting (via Java reflection) the Abstract Syntax Tree of the original Java source file.

    For example, an instance of SFMirror contains all information provided to one use of the @StaticFunctional annotation, including both the declared “Excused Fields” and the associated “Excuses.” Likewise, JDHBIMirror holds the data from a single use of the @JDHeaderBackgroundImg annotation.
    An internally used data-record class used for storing all user-supplied annotation data associated with a single use / application of the IntoHTMLTable annotation.
    See Also:
    IntoHTMLTable


    • Method Detail

      • getAnnotationAsString

        🡅  🡇     🗕  🗗  🗖
        public java.lang.String getAnnotationAsString()
        Extracts the actual text that a programmer / software engineer has placed onto a Java Entity or Type, and returns it as a String.
        Specified by:
        getAnnotationAsString in interface AnnotationMirror
        Returns:
        The text of the annotation which the user has placed.
        Code:
        Exact Method Body:
         return annotationAsStr;
        
      • toString

        🡅     🗕  🗗  🗖
        public java.lang.String toString()
        Generates a String representation of this mirror instance.
        Specified by:
        toString in interface AnnotationMirror
        Overrides:
        toString in class java.lang.Object
        Returns:
        A java.lang.String representing this instance data
        Code:
        Exact Method Body:
         // 19 ==> Width of the Title Strings....  They are all 19 characters wide
         // 
         // public final Background              background;
         // public final String                  title;
         // public final ReadOnlyList<String>    divCSSClass;
         // public final ReadOnlyList<String>    tableCSSClass;
        
         return
             annotationAsStr + '\n' +
             "{\n" +
             "    background:    " + background.toString()                   + '\n' +
             "    title:         " + HELPER.TOSTR(this.title, 19)            + '\n' +
             "    divCSSClass:   " + HELPER.TOSTR(this.divCSSClass, 19)      + '\n' +
             "    tableCSSClass: " + HELPER.TOSTR(this.tableCSSClass, 19)    + '\n' +
             '}';