Class RelationshipExtractor
java.lang.Object
nl.datasteel.crudcraft.codegen.reader.field.RelationshipExtractor
- All Implemented Interfaces:
FieldPartExtractor<Relationship>
Singleton extractor for extracting relationships from fields annotated with JPA annotations.
This class implements the FieldPartExtractor interface for Relationship type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RelationshipExtractor
Singleton instance of RelationshipExtractor. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextract
(VariableElement field, ProcessingEnvironment env) Extracts a Relationship from a VariableElement representing a field.
-
Field Details
-
INSTANCE
Singleton instance of RelationshipExtractor.
-
-
Constructor Details
-
RelationshipExtractor
public RelationshipExtractor()
-
-
Method Details
-
extract
Extracts a Relationship from a VariableElement representing a field.- Specified by:
extract
in interfaceFieldPartExtractor<Relationship>
- Parameters:
field
- the VariableElement to extract fromenv
- the ProcessingEnvironment for accessing annotations- Returns:
- a Relationship instance representing the field's relationship
-