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.NamedQueries","jakarta.persistence.NamedNativeQuery","jakarta.persistence.NamedNativeQueries","jakarta.persistence.NamedEntityGraph","jakarta.persistence.NamedEntityGraphs","jakarta.persistence.SqlResultSetMapping","jakarta.persistence.SqlResultSetMappings","org.hibernate.annotations.FetchProfile","org.hibernate.annotations.FetchProfiles","org.hibernate.annotations.FilterDef","org.hibernate.annotations.FilterDefs","org.hibernate.annotations.NamedQuery","org.hibernate.annotations.NamedQueries","org.hibernate.annotations.NamedNativeQuery","org.hibernate.annotations.NamedNativeQueries","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","include","exclude","index"})
public class HibernateProcessor
extends AbstractProcessor
Main annotation processor.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Whether thejakarta.annotation.Generated
annotation should be added to the generated classesstatic final String
Assuming that ADD_GENERATED_ANNOTATION is enabled, this option controls whether@Generated#date
should be populated.static final String
A comma-separated list of warnings to suppress, or simplytrue
if@SuppressWarnings({"deprecation","rawtypes"})
should be added to the generated classes.static final String
Debug logging from the processorstatic final String
static final String
Option to exclude certain types, according to a list of patterns.static final String
Controls whether the processor should consider XML filesstatic final String
Option to include only certain types, according to a list of patterns.static final String
Option to suppress creation of a filesystem-based index of entity types and enums for use by the query validator.static final String
Controls whether the processor should only load XML files when there have been changesstatic final String
Path to anorm.xml
filestatic final String
Path to apersistence.xml
filestatic final String
Option 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(ProcessingEnvironment processingEnvironment) boolean
process
(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment) Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, isInitialized
-
Field Details
-
DEBUG_OPTION
Debug logging from the processor- See Also:
-
PERSISTENCE_XML_OPTION
Path to apersistence.xml
file- See Also:
-
ORM_XML_OPTION
Path to anorm.xml
file- See Also:
-
FULLY_ANNOTATION_CONFIGURED_OPTION
Controls whether the processor should consider XML files- See Also:
-
LAZY_XML_PARSING
Controls whether the processor should only load XML files when there have been changes- See Also:
-
ADD_GENERATED_ANNOTATION
Whether thejakarta.annotation.Generated
annotation should be added to the generated classes- See Also:
-
ADD_GENERATION_DATE
Assuming that ADD_GENERATED_ANNOTATION is enabled, this option controls whether@Generated#date
should be populated.- See Also:
-
ADD_SUPPRESS_WARNINGS_ANNOTATION
A comma-separated list of warnings to suppress, or simplytrue
if@SuppressWarnings({"deprecation","rawtypes"})
should be added to the generated classes.- See Also:
-
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:
-
INCLUDE
Option to include only certain types, according to a list of patterns. The wildcard character is*
, and patterns are comma-separated. For example:*.entity.*,*Repository
. The default include is simply*
, meaning that all types are included.- See Also:
-
EXCLUDE
Option to exclude certain types, according to a list of patterns. The wildcard character is*
, and patterns are comma-separated. For example:*.framework.*,*$$
. The default exclude is empty.- See Also:
-
INDEX
Option to suppress creation of a filesystem-based index of entity types and enums for use by the query validator. By default, and index is created.- See Also:
-
ENTITY_INDEX
- See Also:
-
-
Constructor Details
-
HibernateProcessor
public HibernateProcessor()
-
-
Method Details
-
init
- Specified by:
init
in interfaceProcessor
- Overrides:
init
in classAbstractProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersion
in interfaceProcessor
- Overrides:
getSupportedSourceVersion
in classAbstractProcessor
-
process
- Specified by:
process
in interfaceProcessor
- Specified by:
process
in classAbstractProcessor
-