Package Torello.JavaDoc
Enum Entity
- java.lang.Object
-
- java.lang.Enum<Entity>
-
- Torello.JavaDoc.Entity
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Entity>
public enum Entity extends java.lang.Enum<Entity>
Entity: Exhaustive list of all items that may be defined inside of a Java Type.
This is the complete list of 'things' (here-to-fore referred to as'Entity'
), thay may be defined inside of a Java class, interface, annotation, enum or record.
For convenience, and more advanced users, these enum constants keep references to the Type Mirrors that are related to the enum's name (as ajava.lang.Class
)
Hi-Lited Source-Code:- View Here: Torello/JavaDoc/Entity.java
- Open New Browser-Tab: Torello/JavaDoc/Entity.java
File Size: 13,492 Bytes Line Count: 289 '\n' Characters Found
-
-
Enum Constant Summary
Enum Constants Enum Constant ANNOTATION_ELEM
CONSTRUCTOR
ENUM_CONSTANT
FIELD
INNER_CLASS
METHOD
-
Field Summary
Convenience Reflection Classes / Type-Mirrors Modifier and Type Field Class<? extends Tree>
oracleReflectionClass
Class<? extends Declaration>
upgraderReflectionClass
CSS ID-Prefix Abbreviation-String Modifier and Type Field String
abbrev
Java-Doc Web-Page HTML-Comment Section Markers Modifier and Type Field String
jdDetailMarker
String
jdSummaryMarker
-
Method Summary
Convert String to Enum Constant Modifier and Type Method static Entity
valueOf(String name)
List all Enum Constants Modifier and Type Method static Entity[]
values()
More Methods Modifier and Type Method boolean
isCallable()
String
jdDetailMarker()
String
jdSummaryMarker()
-
-
-
Enum Constant Detail
-
FIELD
-
METHOD
-
CONSTRUCTOR
public static final Entity CONSTRUCTOR
Denotes Constructor(s).
-
ANNOTATION_ELEM
public static final Entity ANNOTATION_ELEM
Used for the 'Elements' - which must be located inside an Annotation Definition - but are not always required or mandatory. Only an@interface
(Annotation
) may have "Annotation Elements".
Optional & Required:
Because there are two types of Annotation-Members (option & required - where optional elements have adefault value
assigned!), null is assigned to theString
-FieldjdSummaryMarker
.
Java puts both types of Annotation-Members in the same details-section on a Java Doc Web-Page. Therefore there is only one Detail-Section HTML-Comment Marker, and thatpublic
&final
String
-field (@link #jdDetailMarker) is non-null, and provided by this constant.
-
ENUM_CONSTANT
public static final Entity ENUM_CONSTANT
Used for the Enumerated-Constants. These are the Java-Identifiers which may only be found inside a Java'enum'
.
-
INNER_CLASS
public static final Entity INNER_CLASS
Denotes Static inner-class(es), inner-interface(s), inner-enums, etc.
-
-
Field Detail
-
upgraderReflectionClass
public final java.lang.Class<? extends Declaration> upgraderReflectionClass
This is provided for more custom upgrades that could possible need to make aswitch
using thisjava.lang.Class
. Utilizing thesepublic
andfinal
enum-fields isn't required for using this upgrader at all; however, this 'Type Mirror' (Class) could potentially be convenient for an advanced user making his own custom modifications to Java Doc Pages.
TheClass<? extends
instance stored in this 'Type Mirror' field is just the actualDeclaration
>java.lang.class
of one of the six CIET-Types. Specifically this field will always evaluate to one of the following values:Constant Ugrader Reflection Class METHOD
Method
.class
FIELD
Field
.class
CONSTRUCTOR
Constructor
.class
ENUM_CONSTANT
EnumConstant
.class
ANNOTATION_ELEM
AnnotationElem
.class
INNER_CLASS
NestedType
.class
-
oracleReflectionClass
public final java.lang.Class<? extends com.sun.source.tree.Tree> oracleReflectionClass
This is provided for more custom upgrades that could possible need to make aswitch
using thisjava.lang.Class
. Utilizing thesepublic
andfinal
enum-fields isn't required for using this upgrader at all; however, this 'Type Mirror' (Class) could potentially be convenient for an advanced user making his own custom modifications to Java Doc Pages.
TheClass<? extends Node>
instance stored in this 'Type Mirror' field is the actualjava.lang.Class
of thecom.sun.source.tree
Node that is used to build this kind ofEntity
. Specifically, this field will always evaluate to one of the following Java Class values:Constant Sun/Oracle Reflection Class METHOD
MethodTree.class FIELD
VariableTree.class CONSTRUCTOR
MethodTree.class ENUM_CONSTANT
VariableTree.class ANNOTATION_ELEM
MethodTree.class INNER_CLASS
ClassTree.class
-
abbrev
public final java.lang.String abbrev
Two character abbreviation-string for thisEntity
, usefull for CSS ID's
-
jdSummaryMarker
public final java.lang.String jdSummaryMarker
For all constants in thisenum
, this field will contain an identical value to the value returned by methodjdSummaryMarker()
- except for the constant namedANNOTATION_ELEM
. For theANNOTATION_ELEM
constant, this field will contain null.
(This is because there are two types of Annotation-Elements - optional and required - and therefore two different markers for their respective Summary Sections on a Java-Doc Web-Page)
TheString
-values contained in this field are listed in the following table:Constant JavaDoc HTML-Comment Summary-Marker METHOD
"==== METHOD SUMMARY ====" FIELD
"==== FIELD SUMMARY ====" CONSTRUCTOR
"==== CONSTRUCTOR SUMMARY ====" ENUM_CONSTANT
"==== ENUM CONSTANT SUMMARY ====" ANNOTATION_ELEM
null INNER_CLASS
"==== NESTED CLASS SUMMARY ====" - See Also:
jdSummaryMarker()
- Code:
- Exact Field Declaration Expression:
public final String jdSummaryMarker;
-
jdDetailMarker
public final java.lang.String jdDetailMarker
For all constants in thisenum
, this field will contain an identical value to the value returned by methodjdDetailMarker()
- except for the constant namedINNER_CLASS
. For theINNER_CLASS
constant, this field will contain null.
(This is because Nested-Types do not have "Details Sections" on a Java-Doc Generated Web-Page. Nested-Types get their own respective pages!) When the methodjdDetailMarker()
is invoked on theINNER_CLASS
constant, that method will simply throw an exception.
TheString
-values contained in this field are listed in the following table:Constant JavaDoc HTML-Comment Detail-Marker METHOD
"==== METHOD DETAIL ====" FIELD
"==== FIELD DETAIL ====" CONSTRUCTOR
"==== CONSTRUCTOR DETAIL ====" ENUM_CONSTANT
"==== ENUM CONSTANT DETAIL ====" ANNOTATION_ELEM
"==== ANNOTATION TYPE MEMBER DETAIL ====" INNER_CLASS
null - See Also:
jdDetailMarker()
- Code:
- Exact Field Declaration Expression:
public final String jdDetailMarker;
-
-
Method Detail
-
values
public static Entity[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Entity c : Entity.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Entity valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
jdSummaryMarker
public java.lang.String jdSummaryMarker()
Inside the HTML of a Java-Doc Web-Page, each of the entities will have a summary section that is demarcated by an HTML Comment to signal the beginning of that summary-section. The contents of this HTML comment may be retrieved by calling this method.
This'enum'
also has apublic
fieldString
-constant with the same name as this method (apublic
&final
field of typeString
namedjdSummaryMarker
. This field contains an identicalString
as the return-values for this method, except for the constant namedANNOTATION_ELEM
(which is explained below).- Returns:
- The HTML Commennt Marker that Java-Doc uses to indicate the beginning of the HTML
Summary Section on a Java-Doc Generated Web-Page associated with
'this'
entity.
If this instance ofEntity
is theANNOTATION_ELEM
instance, then this method will throw anUpgradeException
The complete list of Summary-Section Begin Markers can be viewed in the table-provided HERE. - Throws:
UpgradeException
- If this method is invoked on theANNOTATION_ELEM
constant.- See Also:
jdSummaryMarker
- Code:
- Exact Method Body:
if (this == ANNOTATION_ELEM) throw new UpgradeException( "You have asked Entity.ANNOTATION_ELEM for the HTML Comment Summary Marker, but " + "this is not allowed because there are two kinds of Annotation Element Summaries. " + "As such, there is no way to distinguish which Comment-Marker String is being " + "requeted. An Annotation could have an 'Optional Annotation Element Summary', and " + "a 'Required Annotation Element Summary.'" ); return jdSummaryMarker;
-
jdDetailMarker
public java.lang.String jdDetailMarker()
- Returns:
- The HTML Commennt Marker that Java-Doc uses to indicate the beginning of the HTML
Detail Section on a Java-Doc Generated Web-Page associated with
'this'
entity.
If this instance ofEntity
is theINNER_CLASS
instance, then this method will throw anUpgradeException
The complete list of Detail-Section Begin Markers can be viewed in the table-provided HERE. - Throws:
UpgradeException
- If this method is invoked on theINNER_CLASS
constant. Java-Doc Generated Web-Pages simply do not have Details-Sections. This is because Java-Doc will create a full and separate page for inner-classes / nested-types.- See Also:
jdDetailMarker
- Code:
- Exact Method Body:
if (this == INNER_CLASS) throw new UpgradeException( "Nested-Types simply do not have a Details-Section on a Java-Doc Web-Page (they " + "get their own page!) Therefore there is no Detail-Section Start Comment-Marker " + "to provide here." ); return jdDetailMarker;
-
isCallable
public boolean isCallable()
Checks whether'this'
is an instance that represents an entity that may be called or invoked (and would, therefore, accept parameters as input). In Java, both methods and constructors may be invoked.- Returns:
TRUE
if'this'
instance is either theMETHOD
or theCONSTRUCTOR
constant. ReturnsFALSE
otherwise.- Code:
- Exact Method Body:
return (this == METHOD) || (this == CONSTRUCTOR);
-
-