Class TypeResolver

    • Method Detail

      • getDeclaringClass

        public org.jboss.jandex.ClassInfo getDeclaringClass()
        Get the declaring class of the annotation target.
        Returns:
        the ClassInfo of the class that declares the optimal annotation target for the type represented by the current instance.
      • getAnnotationTarget

        public org.jboss.jandex.AnnotationTarget getAnnotationTarget()
        Get the annotation target that represents this instance's schema property.
        Returns:
        the optimal annotation target for the type represented by the current instance.
      • getUnresolvedType

        public org.jboss.jandex.Type getUnresolvedType()
      • getPropertyName

        public String getPropertyName()
        Determine the name of the instance's property. The name may be overridden by one of several annotations, selected in the following order:
        1. MP Open API @Schema
        2. JSON-B @JsonbProperty
        3. Jackson @JsonProperty
        4. JAXB @XmlElement
        5. JAXB @XmlAttribute
        If no elements have been selected, the default Java bean property name will be returned.
        Returns:
        name of property
      • getBeanPropertyName

        public String getBeanPropertyName()
      • getField

        public org.jboss.jandex.FieldInfo getField()
        Retrieves the field associated with this property. May be null.
        Returns:
        field property
      • getReadMethod

        public org.jboss.jandex.MethodInfo getReadMethod()
        Retrieves the read method (getter) associated with this property. May be null.
        Returns:
        the property's read method (getter)
      • getWriteMethod

        public org.jboss.jandex.MethodInfo getWriteMethod()
        Retrieves the write method (setter) associated with this property. May be null.
        Returns:
        the property's write method (setter)
      • resolveType

        public org.jboss.jandex.Type resolveType()
        Resolve the type that was used to initially construct this TypeResolver
        Returns:
        the resolved type (if found)
      • isIgnored

        public boolean isIgnored()
      • isReadOnly

        public boolean isReadOnly()
      • isWriteOnly

        public boolean isWriteOnly()
      • resolve

        public org.jboss.jandex.Type resolve​(org.jboss.jandex.Type type)
        Resolve a parameterized type against this TypeResolver's resolution stack. If any of the type's arguments are wild card types, the resolution will fall back to the basic getResolvedType(Type) method, resolving none of the arguments.
        Parameters:
        type - type to resolve
        Returns:
        resolved type (if found)
      • getConstraintTargets

        public List<org.jboss.jandex.AnnotationTarget> getConstraintTargets()
      • forClass

        public static TypeResolver forClass​(AnnotationScannerContext context,
                                            org.jboss.jandex.ClassInfo clazz,
                                            org.jboss.jandex.Type leaf)
        Create a new TypeResolver for the given ClassInfo clazz and type. If the Type leaf if not available, the type of the clazz will be used, without parameters.
        Parameters:
        context - current scanner context
        clazz - class to be resolved
        leaf - the type of clazz where referenced
        Returns:
        a new TypeResolver
      • resolveParameterizedAncestor

        public static org.jboss.jandex.ParameterizedType resolveParameterizedAncestor​(AnnotationScannerContext context,
                                                                                      org.jboss.jandex.ParameterizedType pType,
                                                                                      org.jboss.jandex.Type seekType)