Package Torello.JavaDoc
Class Declaration
- java.lang.Object
-
- Torello.JavaDoc.Declaration
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AnnotationElem,Callable,EnumConstant,Field,NestedType
public abstract class Declaration extends java.lang.Object implements java.io.Serializable
Abstract Superclass:
This class is the super-class for all Reflection-Extension Classes in this package.Reflection Class:
Common-Root Ancestor Class of all Bridge Data-Classes.
Common ancestor class to all Reflection-API classes.- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/JavaDoc/Declaration.java
- Open New Browser-Tab: Torello/JavaDoc/Declaration.java
File Size: 25,893 Bytes Line Count: 590 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field static longserialVersionUIDType-Member / Entity Enumerated-Constant (Which Declaration Sub-Class is this?) Modifier and Type Field EntityentityReflection & Inspection: final-Strings Modifier and Type Field StringbodyStringjdCommentStringnameStringsignatureLine Number & Location Information Modifier and Type Field LocationlocationReflection & Inspection: Read-Only String-Lists Modifier and Type Field ReadOnlyList<String>annotationsReadOnlyList<String>modifiersJavaDoc-Upgrader Annotations-Mirror Modifier and Type Field EntityAnnotationMirrorsjduAnnotationMirrorsInternally Used ID Modifier and Type Field intid
-
Method Summary
Generate Artificial-Intelligence Token-Streams, which are easily converted to Embeddings. Modifier and Type Method abstract ReadOnlyList<ReadOnlyList<String>>getTokenStreams()Methods: class java.lang.Object Modifier and Type Method StringtoString()StringtoString(int flags)
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable. Using theSerializableImplementation 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 ofDeclarationis cloned, then thisidfield is also cloned / copied.- Code:
- Exact Field Declaration Expression:
public final int id;
-
jduAnnotationMirrors
public final EntityAnnotationMirrors jduAnnotationMirrors
- Code:
- Exact Field Declaration Expression:
public final EntityAnnotationMirrors jduAnnotationMirrors;
-
name
public final java.lang.String name
The Name of the javaField,Method,Constructor,EnumConstantorAnnotationElem. This will be a simple, standard 'Java Identifier'.
Note that the name of aConstructor(for-example) is always just the name of the class.
This field will never be null.- Code:
- Exact Field Declaration Expression:
public final String name;
-
signature
public final java.lang.String signature
The complete, declared Signature (as aString) of theMethod,Field,Constructor,EnumConstantorAnnotationElem.
This field would never be null.- Code:
- Exact Field Declaration Expression:
public final String signature;
-
jdComment
public final java.lang.String jdComment
The Java Doc Comment of this 'Entity' (Field,Method,Constructor,EnumConstant,AnnotationElemorNestedType) as aString- if one exists. The Java Doc Comment is the one defined directly above theDeclaration.
If thisEntity/ Member (Field, Method, Constructoretc...) did not have a Java Doc Comment placed on it, then this field'jdComment'will benull.- Code:
- Exact Field Declaration Expression:
public final String jdComment;
-
body
public final java.lang.String body
The Body of this 'Entity' (Field,Method,Constructor,EnumConstant,AnnotationElemorNestedType) as aString- if one exists.
If thisEntity/ Member (Field, Method, Constructoretc...) did not have a body, then this field'body'will benull.
The'body'of aMethodorConstructoris exactly the code that comprises it. If the method isabstract, then the method will not have a body, and in such cases this field will be null. If this member / entity is aFieldthen the body is the initializer of theField. Again, if there were no initializer for the field, then'body'would also be null.- Code:
- Exact Field Declaration Expression:
public final String body;
-
entity
public final Entity entity
This just stores the type ofEntitythis is. For sub-classes instances ofDeclarationwhich areMethod, this field will be equal toEntity.METHOD. For instances of theFieldsub-class, this will equalEntity.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 toDeclaration.getClass()(when retrieving the specificDeclarationsub-class type).
Reminder:
Both this class, and sub-classCallableare declaredabstract, and only instances of Method, Field, Constructor, etc... can be instantiated. Only non-abstractimplementations of this class need to worry about assigning this field to any real-value.- Code:
- Exact Field Declaration Expression:
public final Entity entity;
-
location
-
modifiers
public ReadOnlyList<java.lang.String> modifiers
The'modifiers'placed on thisDeclaration, includingString'ssuch as:public, static, finaletc...- Code:
- Exact Field Declaration Expression:
public ReadOnlyList<String> modifiers;
-
annotations
public ReadOnlyList<java.lang.String> annotations
The'annotations'that decorate this declaration. It is important to keep in mind that the vast majority ofMethod's, Field's, Constructor'sandEnumConstant'sinside of any CIET will not have any'annotations'that adorn them - at all. For manyDeclaration'sthisString-List will have a length of'0'.
Unparsed Raw-Text:
TheString'scontained here will be the un-parsed raw text that was used in the'.java'source code. What that means is that when aMethod, Field, EnumConstantetc... is annotated using an annotation (starting with the'@'-symbol), whatever text-Stringthe programmer actually typed next to thatMethod, Field, ConstructororEnumConstant- is what will be present in thisString-List. This means that if the annotation itself has elements / parameters, they are not parsed, but they are included in theString.
For Example:
If@SuppressWarnings({"unchecked", "rawtypes"})were attached to a method (for example), that exactStringwould be one of the elements of thisString-array. Retrieving the'value'element array contents"unchecked"and"rawtypes"is left as a parsing exercise to the programmer.- Code:
- Exact Field Declaration Expression:
public ReadOnlyList<String> annotations;
-
-
Method Detail
-
toString
public java.lang.String toString()
Dummy Method. Overriden by Concrete Sub-Classes.- Overrides:
toStringin classjava.lang.Object- See Also:
Method.toString(),Field.toString(),Constructor.toString()- Code:
- Exact Method Body:
return "Declaration is Abstract, all Concrete Sub-Classes Override this method.";
-
toString
public java.lang.String toString(int flags)
Dummy Method. Overriden by Concrete Sub-Classes.- See Also:
Method.toString(int),Field.toString(int),Constructor.toString(int)- Code:
- Exact Method Body:
return "Declaration is Abstract, all Concrete Sub-Classes Override this method.";
-
getTokenStreams
public abstract ReadOnlyList<ReadOnlyList<java.lang.String>> getTokenStreams ()
Chat-GPT and me wrote a Token-Stream Generator-Method that can be used for creating the List-Data that needs to be sent to the Embeddings-Generator for creating an Embeddings-RAG using my Reflection-Classes.- Returns:
- A proper list of "Chunked Tokens" that may be sent to the Open-AI REST-API to generate an Embeddings-Vector
-
-