Enum 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 a java.lang.Class)


    • Enum Constant Detail

      • 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 a default value assigned!), null is assigned to the String-Field jdSummaryMarker.

        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 that public & final String-field (@link #jdDetailMarker) is non-null, and provided by this constant.
    • Field Detail

      • 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 a switch using this java.lang.Class. Utilizing these public and final 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.

        The Class<? extends Node> instance stored in this 'Type Mirror' field is the actual java.lang.Class of the com.sun.source.tree Node that is used to build this kind of Entity. 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 this Entity, usefull for CSS ID's
      • jdSummaryMarker

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String jdSummaryMarker
        For all constants in this enum, this field will contain an identical value to the value returned by method jdSummaryMarker() - except for the constant named ANNOTATION_ELEM. For the ANNOTATION_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)

        The String-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 this enum, this field will contain an identical value to the value returned by method jdDetailMarker() - except for the constant named INNER_CLASS. For the INNER_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 method jdDetailMarker() is invoked on the INNER_CLASS constant, that method will simply throw an exception.

        The String-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 name
        java.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 a public field String-constant with the same name as this method (a public & final field of type String named jdSummaryMarker. This field contains an identical String as the return-values for this method, except for the constant named ANNOTATION_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 of Entity is the ANNOTATION_ELEM instance, then this method will throw an UpgradeException

        The complete list of Summary-Section Begin Markers can be viewed in the table-provided HERE.
        Throws:
        UpgradeException - If this method is invoked on the ANNOTATION_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 of Entity is the INNER_CLASS instance, then this method will throw an UpgradeException

        The complete list of Detail-Section Begin Markers can be viewed in the table-provided HERE.
        Throws:
        UpgradeException - If this method is invoked on the INNER_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 the METHOD or the CONSTRUCTOR constant. Returns FALSE otherwise.
        Code:
        Exact Method Body:
         return (this == METHOD) || (this == CONSTRUCTOR);