Class DynamicClassDetails
java.lang.Object
org.hibernate.models.internal.dynamic.AbstractAnnotationTarget
org.hibernate.models.internal.dynamic.DynamicClassDetails
- All Implemented Interfaces:
AnnotationTargetSupport,ClassDetailsSupport,AnnotationTarget,ClassDetails,MutableAnnotationTarget,MutableClassDetails,TypeVariableScope
ClassDetails which does not necessarily map to a physical Class (dynamic models)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.models.spi.AnnotationTarget
AnnotationTarget.AnnotationUsageProcessor<T>, AnnotationTarget.KindNested classes/interfaces inherited from interface org.hibernate.models.spi.ClassDetails
ClassDetails.ClassDetailsConsumer -
Field Summary
Fields inherited from interface org.hibernate.models.spi.ClassDetails
CLASS_CLASS_DETAILS, OBJECT_CLASS_DETAILS, VOID_CLASS_DETAILS, VOID_OBJECT_CLASS_DETAILS -
Constructor Summary
ConstructorsConstructorDescriptionDynamicClassDetails(String name, String className, boolean isAbstract, ClassDetails superClass, TypeDetails genericSuperType, SourceModelBuildingContext buildingContext) DynamicClassDetails(String name, String className, Class<?> javaType, boolean isAbstract, ClassDetails superClass, TypeDetails genericSuperType, SourceModelBuildingContext buildingContext) DynamicClassDetails(String name, ClassDetails superClass, TypeDetails genericSuperType, SourceModelBuildingContext buildingContext) DynamicClassDetails(String name, SourceModelBuildingContext buildingContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddField(FieldDetails fieldDetails) voidaddMethod(MethodDetails methodDetails) applyAttribute(String name, ClassDetails type, boolean isArray, boolean isPlural, Consumer<DynamicFieldDetails> configuration, SourceModelBuildingContext context) Creates a field representing an attribute and adds it to this class.applyAttribute(String name, TypeDetails type, boolean isArray, boolean isPlural, Consumer<DynamicFieldDetails> configuration, SourceModelBuildingContext context) Creates a field representing an attribute and adds it to this classThe name of theClass, ornullfor dynamic models.Get the fields for this classDetails for the interfaces this class implements.Get the methods for this classgetName()The name of the class.Get the record components for this classDetails for the class that is the super type for this class.Access to the type parameters associated with this class.booleanWhether the class should be considered abstract.booleanisImplementor(Class<?> checkType) Whether the described class is an implementor of the givencheckType.booleanisRecord()Where the class is a Java recordbooleanWhether the Class, if one, represented by this ClassDetails is already loaded on the ClassLoader used for loading.<X> Class<X>Know what you are doing before calling this methodtoString()Methods inherited from class org.hibernate.models.internal.dynamic.AbstractAnnotationTarget
addAnnotationUsage, clearAnnotationUsages, getBuildingContext, getUsageMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.models.spi.AnnotationTarget
forAllAnnotationUsages, forEachAnnotationUsage, fromAnnotations, getNamedAnnotationUsage, getSingleAnnotationUsage, getSingleAnnotationUsageMethods inherited from interface org.hibernate.models.internal.AnnotationTargetSupport
forEachAnnotationUsage, getAllAnnotationUsages, getAnnotationUsage, getBuildingContext, getMetaAnnotated, getNamedAnnotationUsage, getNamedAnnotationUsage, getRepeatedAnnotationUsages, getUsageMap, hasAnnotationUsage, hasRepeatableAnnotationUsage, locateAnnotationUsageMethods inherited from interface org.hibernate.models.spi.ClassDetails
determineRawClass, findField, findFieldByName, findRecordComponent, findRecordComponentByName, forEachSuper, forSelfAndEachSuper, getKind, isSuperclass, resolveTypeVariableMethods inherited from interface org.hibernate.models.internal.ClassDetailsSupport
forEachField, forEachMethod, getAnnotationUsage, getNamedAnnotationUsage, getRepeatedAnnotationUsagesMethods inherited from interface org.hibernate.models.spi.MutableAnnotationTarget
addAnnotationUsage, applyAnnotationUsage, applyAnnotationUsage, clearAnnotationUsagesMethods inherited from interface org.hibernate.models.spi.MutableClassDetails
clearMemberAnnotationUsages
-
Constructor Details
-
DynamicClassDetails
-
DynamicClassDetails
public DynamicClassDetails(String name, ClassDetails superClass, TypeDetails genericSuperType, SourceModelBuildingContext buildingContext) -
DynamicClassDetails
public DynamicClassDetails(String name, String className, boolean isAbstract, ClassDetails superClass, TypeDetails genericSuperType, SourceModelBuildingContext buildingContext) -
DynamicClassDetails
public DynamicClassDetails(String name, String className, Class<?> javaType, boolean isAbstract, ClassDetails superClass, TypeDetails genericSuperType, SourceModelBuildingContext buildingContext)
-
-
Method Details
-
getName
Description copied from interface:ClassDetailsThe name of the class. Generally this is the same as the class name. But in the case of Hibernate'sentity-namefeature, this would be theentity-name- Specified by:
getNamein interfaceAnnotationTarget- Specified by:
getNamein interfaceClassDetails
-
getClassName
Description copied from interface:ClassDetailsThe name of theClass, ornullfor dynamic models.- Specified by:
getClassNamein interfaceClassDetails
-
isResolved
public boolean isResolved()Description copied from interface:ClassDetailsWhether the Class, if one, represented by this ClassDetails is already loaded on the ClassLoader used for loading.- Specified by:
isResolvedin interfaceClassDetails- Returns:
truewhen there is a physical backing class, and it is loaded;falseotherwise.
-
isAbstract
public boolean isAbstract()Description copied from interface:ClassDetailsWhether the class should be considered abstract.- Specified by:
isAbstractin interfaceClassDetails
-
isRecord
public boolean isRecord()Description copied from interface:ClassDetailsWhere the class is a Java record- Specified by:
isRecordin interfaceClassDetails
-
getSuperClass
Description copied from interface:ClassDetailsDetails for the class that is the super type for this class.- Specified by:
getSuperClassin interfaceClassDetails
-
getGenericSuperType
- Specified by:
getGenericSuperTypein interfaceClassDetails
-
getImplementedInterfaces
Description copied from interface:ClassDetailsDetails for the interfaces this class implements.- Specified by:
getImplementedInterfacesin interfaceClassDetails
-
getTypeParameters
Description copied from interface:ClassDetailsAccess to the type parameters associated with this class.- Specified by:
getTypeParametersin interfaceClassDetails
-
isImplementor
Description copied from interface:ClassDetailsWhether the described class is an implementor of the givencheckType.- Specified by:
isImplementorin interfaceClassDetails
-
getFields
Description copied from interface:ClassDetailsGet the fields for this class- Specified by:
getFieldsin interfaceClassDetails
-
addField
- Specified by:
addFieldin interfaceMutableClassDetails
-
getMethods
Description copied from interface:ClassDetailsGet the methods for this class- Specified by:
getMethodsin interfaceClassDetails
-
getRecordComponents
Description copied from interface:ClassDetailsGet the record components for this class- Specified by:
getRecordComponentsin interfaceClassDetails
-
addMethod
- Specified by:
addMethodin interfaceMutableClassDetails
-
applyAttribute
public DynamicFieldDetails applyAttribute(String name, ClassDetails type, boolean isArray, boolean isPlural, Consumer<DynamicFieldDetails> configuration, SourceModelBuildingContext context) Creates a field representing an attribute and adds it to this class. -
applyAttribute
public DynamicFieldDetails applyAttribute(String name, TypeDetails type, boolean isArray, boolean isPlural, Consumer<DynamicFieldDetails> configuration, SourceModelBuildingContext context) Creates a field representing an attribute and adds it to this class -
toJavaClass
Description copied from interface:ClassDetailsKnow what you are doing before calling this method- Specified by:
toJavaClassin interfaceClassDetails
-
toString
-