Class AnnotationMetaEntity
java.lang.Object
org.hibernate.processor.annotation.AnnotationMeta
org.hibernate.processor.annotation.AnnotationMetaEntity
- All Implemented Interfaces:
ImportContext
,Metamodel
- Direct Known Subclasses:
NonManagedMetamodel
Class used to collect meta information about an annotated type (entity, embeddable or mapped superclass).
Also repurposed for any type with "auxiliary" annotations like
@NamedQuery
, @FetchProfile
,
@Find
, or @HQL
. We do not distinguish these two kinds of thing, since an entity class may
@NamedQuery
or @FetchProfile
annotations. Entities may not, however, have methods annotated
@Find
or @HQL
, since entity classes are usually concrete classes.-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationMetaEntity
(TypeElement element, Context context, boolean managed, boolean jakartaDataStaticMetamodel, @Nullable AnnotationMeta parent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInnerClass
(AnnotationMetaEntity metaEntity) static AnnotationMetaEntity
create
(TypeElement element, Context context) static AnnotationMetaEntity
create
(TypeElement element, Context context, boolean lazilyInitialised, boolean managed, boolean jakartaData, @Nullable AnnotationMetaEntity parent) final String
final Context
final TypeElement
@Nullable String
getMemberType
(String entityType, String memberName) final String
protected String
final String
@Nullable Element
final String
importType
(String fqcn) Add fqcn to the import list.protected void
init()
boolean
Is this an implementation of a repository interface?boolean
boolean
Can this be injected into things?boolean
Is it a Jakarta Data style metamodel interface?boolean
javadoc()
void
mergeInMembers
(Metamodel other) void
message
(Element method, String message, Diagnostic.Kind severity) void
message
(Element method, AnnotationMirror mirror, String message, Diagnostic.Kind severity) void
message
(Element method, AnnotationMirror mirror, AnnotationValue value, String message, Diagnostic.Kind severity) scope()
What is its CDI scope for injection?final String
staticImport
(String fqcn, String member) toString()
-
Constructor Details
-
AnnotationMetaEntity
public AnnotationMetaEntity(TypeElement element, Context context, boolean managed, boolean jakartaDataStaticMetamodel, @Nullable AnnotationMeta parent)
-
-
Method Details
-
create
-
create
public static AnnotationMetaEntity create(TypeElement element, Context context, boolean lazilyInitialised, boolean managed, boolean jakartaData, @Nullable AnnotationMetaEntity parent) -
getMemberType
-
getEntityAccessTypeInfo
-
getContext
-
isImplementation
public boolean isImplementation()Description copied from interface:Metamodel
Is this an implementation of a repository interface? -
isJakartaDataStyle
public boolean isJakartaDataStyle()Description copied from interface:Metamodel
Is it a Jakarta Data style metamodel interface? -
isInitialized
public boolean isInitialized() -
getSimpleName
-
getQualifiedName
-
getSuperTypeElement
-
getPackageName
-
getMembers
-
addInnerClass
-
isMetaComplete
public boolean isMetaComplete() -
mergeInMembers
-
generateImports
-
importType
Description copied from interface:ImportContext
Add fqcn to the import list. Returns fqcn as needed in source code. Attempts to handle fqcn with array and generics references.e.g.
java.util.Collection<org.marvel.Hulk>
importsjava.util.Collection
and returnsCollection
org.marvel.Hulk[]
importsorg.marvel.Hulk
and returnsHulk
- Parameters:
fqcn
- Fully qualified class name of the type to import.- Returns:
- import string
-
staticImport
-
getElement
-
isInjectable
public boolean isInjectable()Description copied from interface:Metamodel
Can this be injected into things? -
scope
Description copied from interface:Metamodel
What is its CDI scope for injection? -
toString
-
init
protected void init() -
getSessionVariableName
- Overrides:
getSessionVariableName
in classAnnotationMeta
-
message
-
message
public void message(Element method, AnnotationMirror mirror, String message, Diagnostic.Kind severity) -
message
public void message(Element method, AnnotationMirror mirror, AnnotationValue value, String message, Diagnostic.Kind severity) -
inheritedAnnotations
-
javadoc
-