Tabnine Logo
BasicBeanDescription.findFactoryMethod
Code IndexAdd Tabnine to your IDE (free)

How to use
findFactoryMethod
method
in
org.codehaus.jackson.map.introspect.BasicBeanDescription

Best Java code snippets using org.codehaus.jackson.map.introspect.BasicBeanDescription.findFactoryMethod (Showing top 6 results out of 315)

origin: org.codehaus.jackson/jackson-mapper-asl

  public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig config, JavaType type)
  {
    /* We don't need full deserialization information, just need to
     * know creators.
     */
    BasicBeanDescription beanDesc = config.introspect(type);
    // Ok, so: can we find T(String) constructor?
    Constructor<?> ctor = beanDesc.findSingleArgConstructor(String.class);
    if (ctor != null) {
      if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {
        ClassUtil.checkAndFixAccess(ctor);
      }
      return new StdKeyDeserializer.StringCtorKeyDeserializer(ctor);
    }
    /* or if not, "static T valueOf(String)" (or equivalent marked
     * with @JsonCreator annotation?)
     */
    Method m = beanDesc.findFactoryMethod(String.class);
    if (m != null){
      if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {
        ClassUtil.checkAndFixAccess(m);
      }
      return new StdKeyDeserializer.StringFactoryKeyDeserializer(m);
    }
    // nope, no such luck...
    return null;
  }
}
origin: camunda/camunda-bpm-platform

  public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig config, JavaType type)
  {
    /* We don't need full deserialization information, just need to
     * know creators.
     */
    BasicBeanDescription beanDesc = config.introspect(type);
    // Ok, so: can we find T(String) constructor?
    Constructor<?> ctor = beanDesc.findSingleArgConstructor(String.class);
    if (ctor != null) {
      if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {
        ClassUtil.checkAndFixAccess(ctor);
      }
      return new StdKeyDeserializer.StringCtorKeyDeserializer(ctor);
    }
    /* or if not, "static T valueOf(String)" (or equivalent marked
     * with @JsonCreator annotation?)
     */
    Method m = beanDesc.findFactoryMethod(String.class);
    if (m != null){
      if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {
        ClassUtil.checkAndFixAccess(m);
      }
      return new StdKeyDeserializer.StringFactoryKeyDeserializer(m);
    }
    // nope, no such luck...
    return null;
  }
}
origin: com.barchart.wrap/barchart-wrap-jackson

  public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig config, JavaType type)
  {
    /* We don't need full deserialization information, just need to
     * know creators.
     */
    BasicBeanDescription beanDesc = config.introspect(type);
    // Ok, so: can we find T(String) constructor?
    Constructor<?> ctor = beanDesc.findSingleArgConstructor(String.class);
    if (ctor != null) {
      return new StdKeyDeserializer.StringCtorKeyDeserializer(ctor);
    }
    /* or if not, "static T valueOf(String)" (or equivalent marked
     * with @JsonCreator annotation?)
     */
    Method m = beanDesc.findFactoryMethod(String.class);
    if (m != null){
      return new StdKeyDeserializer.StringFactoryKeyDeserializer(m);
    }
    // nope, no such luck...
    return null;
  }
}
origin: org.codehaus.jackson/com.springsource.org.codehaus.jackson.mapper

  public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig config, JavaType type)
  {
    /* We don't need full deserialization information, just need to
     * know creators.
     */
    BasicBeanDescription beanDesc = config.introspect(type);
    // Ok, so: can we find T(String) constructor?
    Constructor<?> ctor = beanDesc.findSingleArgConstructor(String.class);
    if (ctor != null) {
      return new StdKeyDeserializer.StringCtorKeyDeserializer(ctor);
    }
    /* or if not, "static T valueOf(String)" (or equivalent marked
     * with @JsonCreator annotation?)
     */
    Method m = beanDesc.findFactoryMethod(String.class);
    if (m != null){
      return new StdKeyDeserializer.StringFactoryKeyDeserializer(m);
    }
    // nope, no such luck...
    return null;
  }
}
origin: org.codehaus.jackson/jackson-mapper-lgpl

  public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig config, JavaType type)
  {
    /* We don't need full deserialization information, just need to
     * know creators.
     */
    BasicBeanDescription beanDesc = config.introspect(type);
    // Ok, so: can we find T(String) constructor?
    Constructor<?> ctor = beanDesc.findSingleArgConstructor(String.class);
    if (ctor != null) {
      if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {
        ClassUtil.checkAndFixAccess(ctor);
      }
      return new StdKeyDeserializer.StringCtorKeyDeserializer(ctor);
    }
    /* or if not, "static T valueOf(String)" (or equivalent marked
     * with @JsonCreator annotation?)
     */
    Method m = beanDesc.findFactoryMethod(String.class);
    if (m != null){
      if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {
        ClassUtil.checkAndFixAccess(m);
      }
      return new StdKeyDeserializer.StringFactoryKeyDeserializer(m);
    }
    // nope, no such luck...
    return null;
  }
}
origin: ovea-deprecated/jetty-session-redis

  public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig config, JavaType type)
  {
    /* We don't need full deserialization information, just need to
     * know creators.
     */
    BasicBeanDescription beanDesc = config.introspect(type);
    // Ok, so: can we find T(String) constructor?
    Constructor<?> ctor = beanDesc.findSingleArgConstructor(String.class);
    if (ctor != null) {
      if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {
        ClassUtil.checkAndFixAccess(ctor);
      }
      return new StdKeyDeserializer.StringCtorKeyDeserializer(ctor);
    }
    /* or if not, "static T valueOf(String)" (or equivalent marked
     * with @JsonCreator annotation?)
     */
    Method m = beanDesc.findFactoryMethod(String.class);
    if (m != null){
      if (config.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) {
        ClassUtil.checkAndFixAccess(m);
      }
      return new StdKeyDeserializer.StringFactoryKeyDeserializer(m);
    }
    // nope, no such luck...
    return null;
  }
}
org.codehaus.jackson.map.introspectBasicBeanDescriptionfindFactoryMethod

Javadoc

Method that can be called to find if introspected class declares a static "valueOf" factory method that returns an instance of introspected type, given one of acceptable types.

Popular methods of BasicBeanDescription

  • getBeanClass
  • getClassInfo
  • <init>
  • _findPropertyFields
  • findAnySetter
    Method used to locate the method of introspected class that implements org.codehaus.jackson.annotate
  • findDefaultConstructor
    Method that will locate the no-arg constructor for this class, if it has one, and that constructor h
  • findJsonValueMethod
    Method for locating the getter method that is annotated with org.codehaus.jackson.annotate.JsonValue
  • findMethod
  • findProperties
  • findSerializationInclusion
    Method for determining whether null properties should be written out for a Bean of introspected type
  • findSingleArgConstructor
    Method that can be called to locate a single-arg constructor that takes specified exact type (will n
  • getConstructors
  • findSingleArgConstructor,
  • getConstructors,
  • getFactoryMethods,
  • getType,
  • hasKnownClassAnnotations,
  • instantiateBean,
  • isFactoryMethod,
  • bindingsForBeanType,
  • findAnyGetter

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now