Package org.hibernate.processor
Class HibernateProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- org.hibernate.processor.HibernateProcessor
-
- All Implemented Interfaces:
Processor
- Direct Known Subclasses:
JPAMetaModelEntityProcessor
@SupportedAnnotationTypes({"jakarta.persistence.Entity","jakarta.persistence.MappedSuperclass","jakarta.persistence.Embeddable","jakarta.persistence.NamedQuery","jakarta.persistence.NamedNativeQuery","jakarta.persistence.NamedEntityGraph","jakarta.persistence.SqlResultSetMapping","org.hibernate.annotations.FetchProfile","org.hibernate.annotations.FilterDef","org.hibernate.annotations.NamedQuery","org.hibernate.annotations.NamedNativeQuery","org.hibernate.annotations.processing.HQL","org.hibernate.annotations.processing.SQL","org.hibernate.annotations.processing.Find","jakarta.data.repository.Repository"}) @SupportedOptions({"debug","persistenceXml","ormXml","fullyAnnotationConfigured","lazyXmlParsing","addGenerationDate","addGeneratedAnnotation","addSuppressWarningsAnnotation","suppressJakartaDataMetamodel"}) public class HibernateProcessor extends AbstractProcessor
Main annotation processor.
-
-
Field Summary
Fields Modifier and Type Field Description static StringADD_GENERATED_ANNOTATIONWhether thejakarta.annotation.Generatedannotation should be added to the generated classesstatic StringADD_GENERATION_DATEAssuming that ADD_GENERATED_ANNOTATION is enabled, this option controls whether@Generated#dateshould be populated.static StringADD_SUPPRESS_WARNINGS_ANNOTATIONControls whether@SuppressWarnings({"deprecation","rawtypes"})should be added to the generated classesstatic StringDEBUG_OPTIONDebug logging from the processorstatic StringFULLY_ANNOTATION_CONFIGURED_OPTIONControls whether the processor should consider XML filesstatic StringLAZY_XML_PARSINGControls whether the processor should only load XML files when there have been changesstatic StringORM_XML_OPTIONPath to anorm.xmlfilestatic StringPERSISTENCE_XML_OPTIONPath to apersistence.xmlfilestatic StringSUPPRESS_JAKARTA_DATA_METAMODELOption to suppress generation of the Jakarta Data static metamodel, even when Jakarta Data is available on the build path.-
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv
-
-
Constructor Summary
Constructors Constructor Description HibernateProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourceVersiongetSupportedSourceVersion()voidinit(ProcessingEnvironment processingEnvironment)booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment)-
Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, isInitialized
-
-
-
-
Field Detail
-
DEBUG_OPTION
public static final String DEBUG_OPTION
Debug logging from the processor- See Also:
- Constant Field Values
-
PERSISTENCE_XML_OPTION
public static final String PERSISTENCE_XML_OPTION
Path to apersistence.xmlfile- See Also:
- Constant Field Values
-
ORM_XML_OPTION
public static final String ORM_XML_OPTION
Path to anorm.xmlfile- See Also:
- Constant Field Values
-
FULLY_ANNOTATION_CONFIGURED_OPTION
public static final String FULLY_ANNOTATION_CONFIGURED_OPTION
Controls whether the processor should consider XML files- See Also:
- Constant Field Values
-
LAZY_XML_PARSING
public static final String LAZY_XML_PARSING
Controls whether the processor should only load XML files when there have been changes- See Also:
- Constant Field Values
-
ADD_GENERATED_ANNOTATION
public static final String ADD_GENERATED_ANNOTATION
Whether thejakarta.annotation.Generatedannotation should be added to the generated classes- See Also:
- Constant Field Values
-
ADD_GENERATION_DATE
public static final String ADD_GENERATION_DATE
Assuming that ADD_GENERATED_ANNOTATION is enabled, this option controls whether@Generated#dateshould be populated.- See Also:
- Constant Field Values
-
ADD_SUPPRESS_WARNINGS_ANNOTATION
public static final String ADD_SUPPRESS_WARNINGS_ANNOTATION
Controls whether@SuppressWarnings({"deprecation","rawtypes"})should be added to the generated classes- See Also:
- Constant Field Values
-
SUPPRESS_JAKARTA_DATA_METAMODEL
public static final String SUPPRESS_JAKARTA_DATA_METAMODEL
Option to suppress generation of the Jakarta Data static metamodel, even when Jakarta Data is available on the build path.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(ProcessingEnvironment processingEnvironment)
- Specified by:
initin interfaceProcessor- Overrides:
initin classAbstractProcessor
-
getSupportedSourceVersion
public SourceVersion getSupportedSourceVersion()
- Specified by:
getSupportedSourceVersionin interfaceProcessor- Overrides:
getSupportedSourceVersionin classAbstractProcessor
-
process
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment)
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-
-