Class ParameterNamesAnnotationIntrospector

  • All Implemented Interfaces:
    Versioned, java.io.Serializable

    public class ParameterNamesAnnotationIntrospector
    extends NopAnnotationIntrospector
    Introspector that uses parameter name information provided by the Java Reflection API additions in Java 8 to determine the parameter name for methods and constructors.
    See Also:
    AnnotationIntrospector, Parameter, Serialized Form
    • Method Detail

      • findImplicitPropertyName

        public java.lang.String findImplicitPropertyName​(AnnotatedMember m)
        Description copied from class: AnnotationIntrospector
        Method for finding implicit name for a property that given annotated member (field, method, creator parameter) may represent. This is different from explicit, annotation-based property name, in that it is "weak" and does not either proof that a property exists (for example, if visibility is not high enough), or override explicit names. In practice this method is used to introspect optional names for creator parameters (which may or may not be available and cannot be detected by standard databind); or to provide alternate name mangling for fields, getters and/or setters.
        Overrides:
        findImplicitPropertyName in class AnnotationIntrospector
      • findCreatorAnnotation

        public JsonCreator.Mode findCreatorAnnotation​(MapperConfig<?> config,
                                                      Annotated a)
        Description copied from class: AnnotationIntrospector
        Method called to check whether potential Creator (constructor or static factory method) has explicit annotation to indicate it as actual Creator; and if so, which JsonCreator.Mode to use.

        NOTE: caller needs to consider possibility of both `null` (no annotation found) and JsonCreator.Mode.DISABLED (annotation found, but disabled); latter is necessary as marker in case multiple introspectors are chained, as well as possibly as when using mix-in annotations.

        Overrides:
        findCreatorAnnotation in class AnnotationIntrospector
        Parameters:
        config - Configuration settings in effect (for serialization or deserialization)
        a - Annotated accessor (usually constructor or static method) to check
        Returns:
        Creator mode found, if any; null if none