Examples of JSONCreator


Examples of com.alibaba.fastjson.annotation.JSONCreator

    public static Constructor<?> getCreatorConstructor(Class<?> clazz) {
        Constructor<?> creatorConstructor = null;

        for (Constructor<?> constructor : clazz.getDeclaredConstructors()) {
            JSONCreator annotation = constructor.getAnnotation(JSONCreator.class);
            if (annotation != null) {
                if (creatorConstructor != null) {
                    throw new JSONException("multi-json creator");
                }
View Full Code Here

Examples of com.alibaba.fastjson.annotation.JSONCreator

            if (!clazz.isAssignableFrom(method.getReturnType())) {
                continue;
            }

            JSONCreator annotation = method.getAnnotation(JSONCreator.class);
            if (annotation != null) {
                if (factoryMethod != null) {
                    throw new JSONException("multi-json creator");
                }
View Full Code Here

Examples of com.alibaba.fastjson.annotation.JSONCreator

    public static Constructor<?> getCreatorConstructor(Class<?> clazz) {
        Constructor<?> creatorConstructor = null;

        for (Constructor<?> constructor : clazz.getDeclaredConstructors()) {
            JSONCreator annotation = constructor.getAnnotation(JSONCreator.class);
            if (annotation != null) {
                if (creatorConstructor != null) {
                    throw new JSONException("multi-json creator");
                }
View Full Code Here

Examples of com.alibaba.fastjson.annotation.JSONCreator

            if (!clazz.isAssignableFrom(method.getReturnType())) {
                continue;
            }

            JSONCreator annotation = method.getAnnotation(JSONCreator.class);
            if (annotation != null) {
                if (factoryMethod != null) {
                    throw new JSONException("multi-json creator");
                }
View Full Code Here

Examples of com.fasterxml.jackson.annotation.JsonCreator

                                                        BeanDescription desc) throws JsonMappingException {
            // If there is a JsonCreator annotation we should use that instead of the PermissiveEnumDeserializer
            final Collection<AnnotatedMethod> factoryMethods = desc.getFactoryMethods();
            if (factoryMethods != null) {
                for (AnnotatedMethod am : factoryMethods) {
                    final JsonCreator creator = am.getAnnotation(JsonCreator.class);
                    if (creator != null) {
                        return EnumDeserializer.deserializerForCreator(config, type, am);
                    }
                }
            }
View Full Code Here

Examples of org.codehaus.jackson.annotate.JsonCreator

 
  static Map<String, SqlParameterDefinition> getSqlBeanParameters(Class<?> k, SqlObjectConfig config) {
    Map<String, SqlParameterDefinition> parameters = new LinkedHashMap<String, SqlParameterDefinition>();
    Constructor<?> cons[] = k.getDeclaredConstructors();
    for (Constructor<?> c : cons) {
      JsonCreator jc = c.getAnnotation(JsonCreator.class);
      if (jc == null) continue;
      Annotation[][] aas = c.getParameterAnnotations();
      Class<?>[] pts = c.getParameterTypes();
      if (aas == null || aas.length == 0) continue;
      for (int i = 0; i < aas.length; i++) {
View Full Code Here

Examples of org.codehaus.jackson.annotate.JsonCreator

 
  static Map<String, SqlParameterDefinition> getSqlBeanParameters(Class<?> k, SqlObjectConfig config) {
    Map<String, SqlParameterDefinition> parameters = new LinkedHashMap<String, SqlParameterDefinition>();
    Constructor<?> cons[] = k.getDeclaredConstructors();
    for (Constructor<?> c : cons) {
      JsonCreator jc = c.getAnnotation(JsonCreator.class);
      if (jc == null) continue;
      Annotation[][] aas = c.getParameterAnnotations();
      Class<?>[] pts = c.getParameterTypes();
      if (aas == null || aas.length == 0) continue;
      for (int i = 0; i < aas.length; i++) {
View Full Code Here

Examples of org.codehaus.jackson.annotate.JsonCreator

 
  static Map<String, SqlParameterDefinition> getSqlBeanParameters(Class<?> k, SqlObjectConfig config) {
    Map<String, SqlParameterDefinition> parameters = new LinkedHashMap<String, SqlParameterDefinition>();
    Constructor<?> cons[] = k.getConstructors();
    for (Constructor<?> c : cons) {
      JsonCreator jc = c.getAnnotation(JsonCreator.class);
      if (jc == null) continue;
      Annotation[][] aas = c.getParameterAnnotations();
      Class<?>[] pts = c.getParameterTypes();
      if (aas == null || aas.length == 0) continue;
      for (int i = 0; i < aas.length; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.