Class Declaration

    • Field Summary

       
      Serializable ID
      Modifier and Type Field
      static long serialVersionUID
       
      Type-Member / Entity Enumerated-Constant (Which Declaration Sub-Class is this?)
      Modifier and Type Field
      Entity entity
       
      Reflection & Inspection: final-Strings
      Modifier and Type Field
      String body
      String jdComment
      String name
      String signature
       
      Line Number & Location Information
      Modifier and Type Field
      Location location
       
      Reflection & Inspection: Read-Only String-Lists
      Modifier and Type Field
      ReadOnlyList<String> annotations
      ReadOnlyList<String> modifiers
       
      Internally Used ID
      Modifier and Type Field
      int id
    • Method Summary

       
      Methods: class java.lang.Object
      Modifier and Type Method
      String toString()
      String toString​(int flags)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        🡇     🗕  🗗  🗖
        public static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
         public static final long serialVersionUID = 1;
        
      • id

        🡅  🡇     🗕  🗗  🗖
        public final int id
        For the purposes of passing these around to different parts of the code, every one of these are given a unique ID. This id is unique for a method, whether it was parsed from a detail or a summary section. This id is (probably) not useful outside of the HTML Processor Classes.

        ID Clone:
        If a subclass of Declaration is cloned, then this id field is also cloned / copied.
      • name

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String name
        The Name of the java Field, Method, Constructor, EnumConstant or AnnotationElem. This will be a simple, standard 'Java Identifier'.

        Note that the name of a Constructor (for-example) is always just the name of the class.

        This field will never be null.
      • jdComment

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String jdComment
        The Java Doc Comment of this 'Entity' (Field, Method, Constructor, EnumConstant, AnnotationElem or NestedType) as a String - if one exists. The Java Doc Comment is the one defined directly above the Declaration.

        If this Entity / Member (Field, Method, Constructor etc...) did not have a Java Doc Comment placed on it, then this field 'jdComment' will be null.
      • body

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String body
        The Body of this 'Entity' (Field, Method, Constructor, EnumConstant, AnnotationElem or NestedType) as a String - if one exists.

        If this Entity / Member (Field, Method, Constructor etc...) did not have a body, then this field 'body' will be null.

        The 'body' of a Method or Constructor is exactly the code that comprises it. If the method is abstract, then the method will not have a body, and in such cases this field will be null. If this member / entity is a Field then the body is the initializer of the Field. Again, if there were no initializer for the field, then 'body' would also be null.
      • entity

        🡅  🡇     🗕  🗗  🗖
        public final Entity entity
        This just stores the type of Entity this is. For sub-classes instances of Declaration which are Method, this field will be equal to Entity.METHOD. For instances of the Field sub-class, this will equal Entity.FIELD, and so on and so forth.

        Mostly, this makes code easier to read when used along-side if-statements or switch-statements. This field somewhat akin to Declaration.getClass() (when retrieving the specific Declaration sub-class type).

        Reminder:
        Both this class, and sub-class Callable are declared abstract, and only instances of Method, Field, Constructor, etc... can be instantiated. Only non-abstract implementations of this class need to worry about assigning this field to any real-value.
      • annotations

        🡅  🡇     🗕  🗗  🗖
        public ReadOnlyList<java.lang.String> annotations
        The 'annotations' that decorate this declaration. It is important to keep in mind that the vast majority of Method's, Field's, Constructor's and EnumConstant's inside of any CIET will not have any 'annotations' that adorn them - at all. For many Declaration's this String-List will have a length of '0'.

        Unparsed Raw-Text:
        The String's contained here will be the un-parsed raw text that was used in the '.java' source code. What that means is that when a Method, Field, EnumConstant etc... is annotated using an annotation (starting with the '@'-symbol), whatever text-String the programmer actually typed next to that Method, Field, Constructor or EnumConstant - is what will be present in this String-List. This means that if the annotation itself has elements / parameters, they are not parsed, but they are included in the String.

        For Example:
        If @SuppressWarnings({"unchecked", "rawtypes"}) were attached to a method (for example), that exact String would be one of the elements of this String-array. Retrieving the 'value' element array contents "unchecked" and "rawtypes" is left as a parsing exercise to the programmer.