Package Torello.JavaDoc.Annotations
Class SFMirror
- java.lang.Object
-
- Torello.JavaDoc.Annotations.SFMirror
-
- All Implemented Interfaces:
AnnotationMirror
public class SFMirror 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 theStaticFunctionalannotation.- See Also:
StaticFunctional
Hi-Lited Source-Code:- View Here: Torello/JavaDoc/Annotations/SFMirror.java
- Open New Browser-Tab: Torello/JavaDoc/Annotations/SFMirror.java
File Size: 12,137 Bytes Line Count: 276 '\n' Characters Found
-
-
Field Summary
Annotation Use / Application Data-Fields (Actual Data Typed by the User) Modifier and Type Field ReadOnlyList<String>excusedReadOnlyList<StaticFunctional.Excuse>excuses
-
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
-
excuses
public final ReadOnlyList<StaticFunctional.Excuse> excuses
Holds data extracted fromStaticFunctional.Excuses()- Code:
- Exact Field Declaration Expression:
public final ReadOnlyList<StaticFunctional.Excuse> excuses;
-
excused
public final ReadOnlyList<java.lang.String> excused
Holds data extracted fromStaticFunctional.Excused()- Code:
- Exact Field Declaration Expression:
public final ReadOnlyList<String> excused;
-
-
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 "StaticFunctional";
-
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 ReadOnlyList<Excuse> excuses; // public final ReadOnlyList<String> excused; // // " excuses: ".length() => 13 return this.annotationAsStr + '\n' + "{\n" + " excuses: " + HELPER.TOSTR(this.excuses, 13) + '\n' + " excused: " + HELPER.TOSTR(this.excused, 13) + '\n' + "}";
-
-