Class DynamicFieldDetails

java.lang.Object
org.hibernate.models.internal.dynamic.AbstractAnnotationTarget
org.hibernate.models.internal.dynamic.DynamicFieldDetails
All Implemented Interfaces:
AnnotationTargetSupport, AnnotationTarget, FieldDetails, MemberDetails, MutableAnnotationTarget, MutableMemberDetails

public class DynamicFieldDetails extends AbstractAnnotationTarget implements FieldDetails, MutableMemberDetails
FieldDetails which does not necessarily map to a physical Field (dynamic models)
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: MemberDetails
      The name of the member. This would be the name of the method or field.
      Specified by:
      getName in interface AnnotationTarget
      Specified by:
      getName in interface MemberDetails
    • getType

      public TypeDetails getType()
      Description copied from interface: MemberDetails
      The member type. May be null
      Specified by:
      getType in interface MemberDetails
      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

      public ClassDetails getDeclaringType()
      Description copied from interface: MemberDetails
      The class which declares this member
      Specified by:
      getDeclaringType in interface MemberDetails
    • isPlural

      public boolean isPlural()
      Description copied from interface: MemberDetails
      For member's with an associated type, whether that type considered plural.
      Specified by:
      isPlural in interface MemberDetails
      Returns:
      true When the member has a type and that type is an array or a Map or Collection inheritor
    • isArray

      public boolean isArray()
      Specified by:
      isArray in interface MemberDetails
    • getModifiers

      public int getModifiers()
      Description copied from interface: MemberDetails
      Access to the member modifier flags.
      Specified by:
      getModifiers in interface MemberDetails
      See Also:
    • toJavaMember

      public Member toJavaMember()
      Description copied from interface: MemberDetails
      Access to the underlying Member. May return null. May throw an exception.
      Specified by:
      toJavaMember in interface MemberDetails
      Returns:
      The underlying member, or null if there is no underlying member.
    • resolveRelativeType

      public TypeDetails resolveRelativeType(TypeVariableScope container)
      Description copied from interface: MemberDetails
      Determine the type of the member relative to the given container type.

      For example, given

       class Thing<T extends Number> {
           T id;
       }
       class SubThing extends Thing<Integer> {
           ...
       }
       
      Accessing the id member relative to Thing simply returns the type variable T. However, asking the id member for its type relative to SubThing will report Integer.
      Specified by:
      resolveRelativeType in interface MemberDetails
    • toString

      public String toString()
      Overrides:
      toString in class Object