Package Torello.JavaDoc.Annotations
Class LJSMirror
- java.lang.Object
-
- Torello.JavaDoc.Annotations.LJSMirror
-
- All Implemented Interfaces:
AnnotationMirror
public class LJSMirror 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 ofSFMirrorcontains all information provided to one use of the@StaticFunctionalannotation, including both the declared “Excused Fields” and the associated “Excuses.” Likewise,JDHBIMirrorholds the data from a single use of the@JDHeaderBackgroundImgannotation.An internally used data-record class used for storing all user-supplied annotation data associated with a single use / application of theLinkJavaSourceannotation.- See Also:
LinkJavaSource
Hi-Lited Source-Code:This File's Source Code:
- View Here: Torello/JavaDoc/Annotations/LJSMirror.java
- Open New Browser-Tab: Torello/JavaDoc/Annotations/LJSMirror.java
File Size: 20,252 Bytes Line Count: 458 '\n' Characters Found
User-Annotation Error-Checking Class:
- View Here: Entity Annotations/Mirror/LJSErrorCheck.java
- Open New Browser-Tab: Entity Annotations/Mirror/LJSErrorCheck.java
File Size: 16,420 Bytes Line Count: 375 '\n' Characters Found
-
-
Field Summary
Annotation Use / Application Data-Fields (Actual Data Typed by the User) Modifier and Type Field EntityentityStringhandlebooleanhrefOnlyNoLineNumStringnameByteparamCountReadOnlyList<String>paramNamesReadOnlyList<String>paramTypesJOWStringtypeName
-
Method Summary
Methods: Interface Torello.JavaDoc.Annotations.AnnotationMirror Modifier and Type Method StringgetAnnotationAsString()StringgetAnnotationName()Methods: class java.lang.Object Modifier and Type Method StringtoString()
-
-
-
Field Detail
-
handle
public final java.lang.String handle
Holds data extracted fromLinkJavaSource.handle()- Code:
- Exact Field Declaration Expression:
public final String handle;
-
typeName
public final java.lang.String typeName
Holds data extracted fromLinkJavaSource.typeName()- Code:
- Exact Field Declaration Expression:
public final String typeName;
-
entity
public final Entity entity
Holds data extracted fromLinkJavaSource.entity()- Code:
- Exact Field Declaration Expression:
public final Entity entity;
-
name
public final java.lang.String name
Holds data extracted fromLinkJavaSource.name()- Code:
- Exact Field Declaration Expression:
public final String name;
-
paramCount
public final java.lang.Byte paramCount
Holds data extracted fromLinkJavaSource.paramCount()- Code:
- Exact Field Declaration Expression:
public final Byte paramCount;
-
paramNames
public final ReadOnlyList<java.lang.String> paramNames
Holds data extracted fromLinkJavaSource.paramNames()- Code:
- Exact Field Declaration Expression:
public final ReadOnlyList<String> paramNames;
-
paramTypesJOW
public final ReadOnlyList<java.lang.String> paramTypesJOW
Holds data extracted fromLinkJavaSource.paramTypesJOW()- Code:
- Exact Field Declaration Expression:
public final ReadOnlyList<String> paramTypesJOW;
-
hrefOnlyNoLineNum
public final boolean hrefOnlyNoLineNum
AssignedTRUEif and only ifhandleis the only annotation element that has been assigned a value.- Code:
- Exact Field Declaration Expression:
public final boolean hrefOnlyNoLineNum;
-
-
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 aString.- Specified by:
getAnnotationAsStringin interfaceAnnotationMirror- Returns:
- The text of the annotation which the user has placed.
- Code:
- Exact Method Body:
return annotationAsStr;
-
getAnnotationName
public java.lang.String getAnnotationName()
Extracts the name of the annotation as aString.- Specified by:
getAnnotationNamein interfaceAnnotationMirror- Returns:
- A
Stringsuch as"StaticFunctional"or"IntoHTMLTable". - Code:
- Exact Method Body:
return "LJSMirror";
-
toString
public java.lang.String toString()
Generates aStringrepresentation of this mirror instance.- Specified by:
toStringin interfaceAnnotationMirror- Overrides:
toStringin classjava.lang.Object- Returns:
- A
java.lang.Stringrepresenting this instance data - Code:
- Exact Method Body:
// public final String handle; // public final String typeName; // public final Entity entity; // public final String name; // public final Byte paramCount; // public final ReadOnlyList<String> paramNames; // public final ReadOnlyList<String> paramTypesJOW; // public final boolean hrefOnlyNoLineNum; // // 19 ==> Width of the Title Strings.... They are all 19 characters wide return annotationAsStr + '\n' + "{\n" + "// Category: User Specifications for Hi-Liting and Linking onto Java-Doc Page\n" + " entity: " + HELPER.TOSTR(this.entity) + '\n' + " name: " + HELPER.TOSTR(this.name, 19) + '\n' + " paramCount: " + paramCount + '\n' + " paramNames: " + HELPER.TOSTR(this.paramNames, 19) + '\n' + " paramTypesJOW: " + HELPER.TOSTR(this.paramTypesJOW, 19) + '\n' + '\n' + "// Category: Source-Code File and Class Specification\n" + " handle: " + HELPER.TOSTR(this.handle, 19) + '\n' + " typeName: " + HELPER.TOSTR(this.typeName, 19) + '\n' + '}';
-
-