Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- allFieldsStream() - Method in class io.github.manoelcampos.dtogen.RecordGenerator
- AnnotationData - Record Class in io.github.manoelcampos.dtogen
-
Stores data about an annotation.
- AnnotationData(String, String) - Constructor for record class io.github.manoelcampos.dtogen.AnnotationData
-
Creates an instance of a
AnnotationDatarecord class.
C
- ClassInstantiation - Class in io.github.manoelcampos.dtogen.instantiation
-
Generates the code to instantiate a class.
- CODE_TEMPLATE - Static variable in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
- constructorCall(String) - Method in class io.github.manoelcampos.dtogen.instantiation.ClassInstantiation
- constructorCall(String) - Method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
-
Generates the actual code to call a constructor to instantiate a model object.
- constructorCall(String) - Method in class io.github.manoelcampos.dtogen.instantiation.RecordInstantiation
- contains(VariableElement, Class<? extends Annotation>) - Static method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Checks if a class field has a given annotation.
D
- DTO - Annotation Interface in io.github.manoelcampos.dtogen
-
Creates a record representing a Data Type Object (DTO) for an annotated class/record.
- DTO.Exclude - Annotation Interface in io.github.manoelcampos.dtogen
-
Indicates that the annotated field must be excluded from the generated DTO.
- DTO.MapToId - Annotation Interface in io.github.manoelcampos.dtogen
-
Indicates that the annotated field must be mapped to the DTO as an ID.
- DTOProcessor - Class in io.github.manoelcampos.dtogen
-
Processes DTOGen annotations to dynamically generate DTO records.
- DTOProcessor() - Constructor for class io.github.manoelcampos.dtogen.DTOProcessor
-
Default constructor called during the application compilation process, to further execute the processor.
- DTORecord<T> - Interface in io.github.manoelcampos.dtogen
-
Interface to be implemented by DTO records.
E
- equals(Object) - Method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Indicates whether some other object is "equal to" this one.
- excludedFieldValue(VariableElement) - Method in class io.github.manoelcampos.dtogen.instantiation.ClassInstantiation
-
Gets the value to be used for a excluded field when instantiating a model object from the DTO.
- excludedFieldValue(VariableElement) - Method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
-
Gets the value to be used for a excluded field when instantiating a model object from the DTO.
- excludedFieldValue(VariableElement) - Method in class io.github.manoelcampos.dtogen.instantiation.RecordInstantiation
-
Gets the value to be used for a excluded field when instantiating a model object from the DTO.
F
- FieldUtil - Class in io.github.manoelcampos.dtogen.util
-
Utility methods to get information about a field.
- fieldValue(VariableElement, boolean) - Method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
-
Generates the Java code representing the value to be passed to a given field in a (i) record constructor parameter or (ii) setter method call, depending on if the object being instantiated is a record or a class, respectively.
- findIdField(TypeElement) - Method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Checks if a given type (class/record) has an "id" field.
- findIdField(VariableElement) - Method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Tries to find an "id" field inside a given enclosing type.
- fromModel(T) - Method in interface io.github.manoelcampos.dtogen.DTORecord
G
- generate() - Method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
-
Returns the actual code to call a constructor to instantiate an object using the values from a model object.
- generateFieldInitialization(TypeUtil, VariableElement, Object) - Static method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
-
Returns a string with a default value for a given stream of fields, according to each field type.
- generateFieldListInitialization() - Method in class io.github.manoelcampos.dtogen.RecordGenerator
-
Returns a string with a default value for a given stream of fields, according to each field type.
- generateFieldListInitialization(TypeUtil, Stream<VariableElement>, Object) - Static method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
-
Returns a string with a default value for a given stream of fields, according to each field type.
- generateFieldValueInternal(VariableElement) - Method in class io.github.manoelcampos.dtogen.instantiation.ClassInstantiation
-
Returns value to be given to a field of a model class/record which will be instantiated.
- generateFieldValueInternal(VariableElement) - Method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
- generateFieldValueInternal(VariableElement) - Method in class io.github.manoelcampos.dtogen.instantiation.RecordInstantiation
-
Returns value to be given to a field of a model record which will be instantiated.
- getAsDeclaredType(TypeMirror) - Static method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Gets a
TypeMirroras aDeclaredTypeif thatTypeMirroris in fact aDeclaredType(a non-primitive type). - getClassFields(Types, TypeElement) - Static method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Gets the fields of a given class, including the ones from its superclasses.
- getFieldAnnotations(VariableElement, Predicate<AnnotationData>) - Static method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Gets the annotations of a field.
- getFieldAnnotationsStr(List<AnnotationData>) - Static method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Gets the string representation of the annotations of a field.
- getFieldName(VariableElement) - Static method in class io.github.manoelcampos.dtogen.util.FieldUtil
-
Returns the name of a given field.
- getFirstGenericTypeArgAnnotatedWithDTO(VariableElement) - Method in class io.github.manoelcampos.dtogen.RecordGenerator
-
Checks if a field has a generic type argument annotated with
DTOin order to generate that field using the DTO record instead of the Model class. - getModelTypeElement() - Method in class io.github.manoelcampos.dtogen.RecordGenerator
- getModelTypeName() - Method in class io.github.manoelcampos.dtogen.RecordGenerator
- getName(Class<?>) - Static method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Gets the fully qualified name of an annotation class, replacing the dollar sign ($) by a dot (.) for annotations defined inside other ones (such as
DTO.MapToId). - getPackageName(String) - Static method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Returns the package name of a class, or an empty string if the class has no package.
- getPackageName(TypeElement) - Static method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Returns the package name of a class, or an empty string if the class has no package.
- getProcessor() - Method in class io.github.manoelcampos.dtogen.RecordGenerator
- getSimpleClassName(String) - Static method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Returns the simple name of a class, without the package name.
- getSimpleName() - Method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Returns the simple name of the annotation, without the package name.
- getTypeElement(Element) - Method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Returns a TypeElement that represents the type of an element that represents a field or reference type (class, record, interface...); or null if the type of the element is primitive.
- getTypeMirrorAsTypeElement(TypeMirror) - Method in class io.github.manoelcampos.dtogen.util.TypeUtil
- getTypeName(VariableElement) - Method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Gets the qualified name of a type (including possible generic type arguments) based on a
VariableElementrepresenting a variable/field declared as that type. - getTypeName(VariableElement, boolean, boolean) - Method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Gets the name of a type based on a
VariableElementrepresenting a variable/field declared as that type. - getUpCaseFieldName(String) - Static method in class io.github.manoelcampos.dtogen.util.FieldUtil
-
Returns the name of a field with the first letter in upper case.
H
- hasAnnotation(Element, Class<? extends Annotation>) - Static method in record class io.github.manoelcampos.dtogen.AnnotationData
- hashCode() - Method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Returns a hash code value for this object.
- hasId(Object) - Method in interface io.github.manoelcampos.dtogen.DTORecord
- hasSuperClass(TypeElement) - Static method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Checks if a given class has a superclass other than
Object.
I
- ID_FIELD_NOT_FOUND - Static variable in class io.github.manoelcampos.dtogen.util.FieldUtil
- init(ProcessingEnvironment) - Method in class io.github.manoelcampos.dtogen.DTOProcessor
- io.github.manoelcampos.dtogen - package io.github.manoelcampos.dtogen
- io.github.manoelcampos.dtogen.instantiation - package io.github.manoelcampos.dtogen.instantiation
- io.github.manoelcampos.dtogen.util - package io.github.manoelcampos.dtogen.util
- isEqualTo(Class<?>, AnnotationMirror) - Static method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Checks if an annotation mirror represents a given annotation class, that is, if a given annotation is the one we are looking for.
- isFieldExcluded(VariableElement) - Static method in class io.github.manoelcampos.dtogen.util.FieldUtil
-
Returns true if a field must be excluded from the generated DTO record, false otherwise.
- isFieldTypePkgEqualsTo(String, String) - Static method in class io.github.manoelcampos.dtogen.RecordGenerator
-
Returns true if the package of a field type is equal to a given package.
- isInstanceField(VariableElement) - Static method in class io.github.manoelcampos.dtogen.util.FieldUtil
-
Returns true if a given field is an instance field (not static), false otherwise.
- isNotFieldExcluded(VariableElement) - Static method in class io.github.manoelcampos.dtogen.util.FieldUtil
-
Returns true if a field must not be excluded from the generated DTO record, false otherwise.
- isNotIdField(VariableElement) - Static method in class io.github.manoelcampos.dtogen.util.FieldUtil
- isNotThreeSlashesComment(String) - Static method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Returns true if a line doesn't start with a triple slash comment ///, false otherwise.
- isPrimitive(VariableElement) - Static method in class io.github.manoelcampos.dtogen.util.FieldUtil
-
Checks if the type of given field is a primitive type.
- isPrimitive(TypeMirror) - Static method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Checks if a given type is a primitive type.
- isRecord(Element) - Static method in class io.github.manoelcampos.dtogen.util.TypeUtil
-
Checks if a given element is a
Record.
J
- JavaFileReader - Class in io.github.manoelcampos.dtogen
-
An utility class to read Java source files.
- JavaFileWriter - Class in io.github.manoelcampos.dtogen
-
Enables the creation of a Java file from a given String containing the Java code to be written.
- JavaFileWriter(DTOProcessor) - Constructor for class io.github.manoelcampos.dtogen.JavaFileWriter
-
Creates a new JavaFileWriter object.
M
- METHOD_CALL_CLOSING - Static variable in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
N
- name() - Method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Returns the value of the
namerecord component. - newInstance(RecordGenerator, TypeElement) - Static method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
- newObject(Object, Supplier<O>) - Method in interface io.github.manoelcampos.dtogen.DTORecord
-
Returns a new model object (which may be different from the DTO model (T)).
- newObject(VariableElement, String) - Method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
-
Generates the code to instantiate a model object from the type of given field.
- newObjectInternal(String, String, Stream<VariableElement>) - Method in class io.github.manoelcampos.dtogen.instantiation.ClassInstantiation
- newObjectInternal(String, String, Stream<VariableElement>) - Method in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
- newObjectInternal(String, String, Stream<VariableElement>) - Method in class io.github.manoelcampos.dtogen.instantiation.RecordInstantiation
O
- ObjectInstantiation - Class in io.github.manoelcampos.dtogen.instantiation
-
Generates the code to instantiate an object, whose type is a class or record, using the values from a model class/record object.
P
- process(Set<? extends TypeElement>, RoundEnvironment) - Method in class io.github.manoelcampos.dtogen.DTOProcessor
R
- readFromResources(String, String) - Static method in class io.github.manoelcampos.dtogen.JavaFileReader
-
Reads a Java source file from the resources folder inside the DTOGen jar.
- recordGen - Variable in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
-
A
RecordGeneratorinstance for the DTO record being generated, which indicates the class/record of the model object to - RecordGenerator - Class in io.github.manoelcampos.dtogen
-
Generates a
Recordjava file from a given model class. - RecordGenerator(DTOProcessor, Element) - Constructor for class io.github.manoelcampos.dtogen.RecordGenerator
- RecordInstantiation - Class in io.github.manoelcampos.dtogen.instantiation
-
Generates the code to instantiate a record.
T
- toModel() - Method in interface io.github.manoelcampos.dtogen.DTORecord
- toString() - Method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Returns a string representation of this record class.
- types() - Method in class io.github.manoelcampos.dtogen.DTOProcessor
- typeUtil - Variable in class io.github.manoelcampos.dtogen.instantiation.ObjectInstantiation
- typeUtil() - Method in class io.github.manoelcampos.dtogen.DTOProcessor
- TypeUtil - Class in io.github.manoelcampos.dtogen.util
-
Utility methods to get information about types such as a class/record/interface.
- TypeUtil(DTOProcessor) - Constructor for class io.github.manoelcampos.dtogen.util.TypeUtil
V
- values() - Method in record class io.github.manoelcampos.dtogen.AnnotationData
-
Returns the value of the
valuesrecord component.
W
- write() - Method in class io.github.manoelcampos.dtogen.RecordGenerator
-
Generates the DTO record for the
DTOannotated class and writes it to a file. - write(String, String, String) - Method in class io.github.manoelcampos.dtogen.JavaFileWriter
-
Writes the code of the generated DTO record to a Java file
All Classes and Interfaces|All Packages|Constant Field Values