Class JdkMethodDetails
java.lang.Object
org.hibernate.models.internal.jdk.AbstractJdkAnnotationTarget
org.hibernate.models.internal.jdk.JdkMethodDetails
- All Implemented Interfaces:
AnnotationTargetSupport,AnnotationTarget,MemberDetails,MethodDetails,MutableAnnotationTarget,MutableMemberDetails
public class JdkMethodDetails
extends AbstractJdkAnnotationTarget
implements MethodDetails, MutableMemberDetails
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.models.spi.AnnotationTarget
AnnotationTarget.AnnotationUsageProcessor<T,A extends Annotation>, AnnotationTarget.Kind Nested classes/interfaces inherited from interface org.hibernate.models.spi.MemberDetails
MemberDetails.VisibilityNested classes/interfaces inherited from interface org.hibernate.models.spi.MethodDetails
MethodDetails.MethodKind -
Constructor Summary
ConstructorsConstructorDescriptionJdkMethodDetails(Method method, MethodDetails.MethodKind methodKind, TypeDetails type, ClassDetails declaringType, ModelsContext modelsContext) -
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
AnnotationDescriptor<A> Safe cast method for cases when the target is an annotation.Safe cast method for cases when the target is a record component.The class which declares this memberintAccess to the member modifier flags.getName()The name of the member.getType()The member type.booleanisArray()booleanisPlural()For member's with an associated type, whether that type considered plural.resolveRelativeClassType(TypeVariableScope container) Determine the concrete class of the member relative to the givencontainertype.resolveRelativeType(TypeVariableScope container) Determine the type of the member relative to the givencontainertype.Access to the underlying Member.toJavaMember(Class<?> declaringClass, ClassLoading classLoading, ModelsContext modelContext) toString()Methods inherited from class org.hibernate.models.internal.jdk.AbstractJdkAnnotationTarget
addAnnotationUsage, clearAnnotationUsages, getModelContext, 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
forEachAnnotationUsage, forEachAnnotationUsage, forEachDirectAnnotationUsage, fromAnnotations, fromContainers, fromSelfAndContainers, getNamedAnnotationUsage, getRepeatedAnnotationUsages, walkContainers, walkSelfAndContainersMethods inherited from interface org.hibernate.models.internal.AnnotationTargetSupport
forEachRepeatedAnnotationUsages, forEachRepeatedAnnotationUsages, getAnnotationUsage, getAnnotationUsage, getDirectAnnotationUsage, getDirectAnnotationUsage, getDirectAnnotationUsages, getMetaAnnotated, getNamedAnnotationUsage, getNamedAnnotationUsage, getNamedAnnotationUsage, getRepeatedAnnotationUsages, hasAnnotationUsage, hasDirectAnnotationUsage, locateAnnotationUsage, removeAnnotationUsage, replaceAnnotationUsageMethods inherited from interface org.hibernate.models.spi.MemberDetails
getAssociatedType, getContainer, getElementType, getMapKeyType, getVisibility, isField, isFinal, isStatic, isSynthetic, resolveRelativeAssociatedTypeMethods inherited from interface org.hibernate.models.spi.MethodDetails
getKind, isPersistable, resolveAttributeNameMethods inherited from interface org.hibernate.models.spi.MutableAnnotationTarget
applyAnnotationUsage, replaceAnnotationUsage
-
Constructor Details
-
JdkMethodDetails
public JdkMethodDetails(Method method, MethodDetails.MethodKind methodKind, TypeDetails type, ClassDetails declaringType, ModelsContext modelsContext)
-
-
Method Details
-
getMethod
-
getName
Description copied from interface:MemberDetailsThe name of the member. This would be the name of the method or field.- Specified by:
getNamein interfaceAnnotationTarget- Specified by:
getNamein interfaceMemberDetails
-
getMethodKind
- Specified by:
getMethodKindin interfaceMethodDetails
-
getType
Description copied from interface:MemberDetailsThe member type. May benull- Specified by:
getTypein interfaceMemberDetails- Returns:
- Returns one of:
- for a field, the field type
- for a getter method, the return type
- for a setter method, the argument type
- otherwise,
null
-
getDeclaringType
Description copied from interface:MemberDetailsThe class which declares this member- Specified by:
getDeclaringTypein interfaceMemberDetails
-
isPlural
public boolean isPlural()Description copied from interface:MemberDetailsFor member's with an associated type, whether that type considered plural.- Specified by:
isPluralin interfaceMemberDetails- Returns:
trueWhen the member has a type and that type is an array or a Map or Collection inheritor
-
isArray
public boolean isArray()- Specified by:
isArrayin interfaceMemberDetails
-
toJavaMember
Description copied from interface:MemberDetailsAccess to the underlying Member. May returnnull. May throw an exception.- Specified by:
toJavaMemberin interfaceMemberDetails- Specified by:
toJavaMemberin interfaceMethodDetails- Returns:
- The underlying member, or
nullif there is no underlying member.
-
toJavaMember
public Method toJavaMember(Class<?> declaringClass, ClassLoading classLoading, ModelsContext modelContext) - Specified by:
toJavaMemberin interfaceMemberDetails- Specified by:
toJavaMemberin interfaceMethodDetails
-
resolveRelativeType
Description copied from interface:MemberDetailsDetermine the type of the member relative to the givencontainertype. For example, given
Accessing theclass Thing<T extends Number>{ T id; }class SubThing extends Thing<Integer>{ ... }idmember relative toThingsimply returns the type variableT. However, asking theidmember for its type relative toSubThingwill reportInteger.- Specified by:
resolveRelativeTypein interfaceMemberDetails
-
resolveRelativeClassType
Description copied from interface:MemberDetailsDetermine the concrete class of the member relative to the givencontainertype. Similar to MemberDetails.resolveRelativeType(TypeVariableScope), but fully resolving the result into the concrete class.- Specified by:
resolveRelativeClassTypein interfaceMemberDetails
-
getModifiers
public int getModifiers()Description copied from interface:MemberDetailsAccess to the member modifier flags.- Specified by:
getModifiersin interfaceMemberDetails- See Also:
-
getReturnType
- Specified by:
getReturnTypein interfaceMethodDetails
-
getArgumentTypes
- Specified by:
getArgumentTypesin interfaceMethodDetails
-
toString
-
asMethodDetails
Description copied from interface:AnnotationTarget- Specified by:
asMethodDetailsin interfaceAnnotationTarget- Specified by:
asMethodDetailsin interfaceAnnotationTargetSupport- Specified by:
asMethodDetailsin interfaceMethodDetails
-
asMemberDetails
Description copied from interface:AnnotationTarget- Specified by:
asMemberDetailsin interfaceAnnotationTarget- Specified by:
asMemberDetailsin interfaceAnnotationTargetSupport- Specified by:
asMemberDetailsin interfaceMemberDetails- Specified by:
asMemberDetailsin interfaceMutableAnnotationTarget- Specified by:
asMemberDetailsin interfaceMutableMemberDetails
-
asFieldDetails
Description copied from interface:AnnotationTarget- Specified by:
asFieldDetailsin interfaceAnnotationTarget- Specified by:
asFieldDetailsin interfaceAnnotationTargetSupport- Specified by:
asFieldDetailsin interfaceMethodDetails
-
asRecordComponentDetails
Description copied from interface:AnnotationTargetSafe cast method for cases when the target is a record component.- Specified by:
asRecordComponentDetailsin interfaceAnnotationTarget- Specified by:
asRecordComponentDetailsin interfaceAnnotationTargetSupport- Specified by:
asRecordComponentDetailsin interfaceMethodDetails
-
asClassDetails
Description copied from interface:AnnotationTarget- Specified by:
asClassDetailsin interfaceAnnotationTarget- Specified by:
asClassDetailsin interfaceAnnotationTargetSupport- Specified by:
asClassDetailsin interfaceMemberDetails- Specified by:
asClassDetailsin interfaceMutableAnnotationTarget- Specified by:
asClassDetailsin interfaceMutableMemberDetails
-
asAnnotationDescriptor
Description copied from interface:AnnotationTargetSafe cast method for cases when the target is an annotation.- Specified by:
asAnnotationDescriptorin interfaceAnnotationTarget- Specified by:
asAnnotationDescriptorin interfaceAnnotationTargetSupport- Specified by:
asAnnotationDescriptorin interfaceMemberDetails- Specified by:
asAnnotationDescriptorin interfaceMutableMemberDetails
-