Examples of JsonProperty


Examples of com.getperka.flatpack.JsonProperty

    Method m = builder.peek().getGetter();
    if (m == null) {
      m = builder.peek().getSetter();
    }

    JsonProperty override = m.getAnnotation(JsonProperty.class);
    if (override != null) {
      builder.withName(override.value());
    } else {
      builder.withName(beanPropertyName(m));
    }
  }
View Full Code Here

Examples of org.apache.shindig.common.JsonProperty

  public void append(Appendable buf, Object pojo) throws IOException {
    JsonSerializer.append(buf, pojo);
  }

  private static String getPropertyName(Method setter) {
    JsonProperty property = setter.getAnnotation(JsonProperty.class);
    if (property == null) {
      String name = setter.getName();
      if (name.startsWith("set") && !Modifier.isStatic(setter.getModifiers())) {
        return name.substring(3, 4).toLowerCase() + name.substring(4);
      }
      return null;
    } else {
      return property.value();
    }
  }
View Full Code Here

Examples of org.apache.shindig.common.JsonProperty

    JsonSerializer.append(buf, pojo);
  }

  @VisibleForTesting
  protected static String getPropertyName(Method setter) {
    JsonProperty property = setter.getAnnotation(JsonProperty.class);
    if (property == null) {
      String name = setter.getName();
      if (name.startsWith("set") && !Modifier.isStatic(setter.getModifiers()) && !setter.isBridge()) {
        return name.substring(3, 4).toLowerCase() + name.substring(4);
      }
      return null;
    } else {
      return property.value();
    }
  }
View Full Code Here

Examples of org.apache.shindig.common.JsonProperty

  public void append(Appendable buf, Object pojo) throws IOException {
    JsonSerializer.append(buf, pojo);
  }

  private static String getPropertyName(Method setter) {
    JsonProperty property = setter.getAnnotation(JsonProperty.class);
    if (property == null) {
      String name = setter.getName();
      if (name.startsWith("set") && !Modifier.isStatic(setter.getModifiers())) {
        return name.substring(3, 4).toLowerCase() + name.substring(4);
      }
      return null;
    } else {
      return property.value();
    }
  }
View Full Code Here

Examples of org.apache.shindig.common.JsonProperty

    setters.put(type, methods);
    return methods;
  }

  private static String getPropertyName(Method setter) {
    JsonProperty property = setter.getAnnotation(JsonProperty.class);
    if (property == null) {
      String name = setter.getName();
      if (name.startsWith("set") && !Modifier.isStatic(setter.getModifiers())) {
        return name.substring(3, 4).toLowerCase() + name.substring(4);
      }
      return null;
    } else {
      return property.value();
    }
  }
View Full Code Here

Examples of org.codehaus.jackson.annotate.JsonProperty

    Field[] paramMap = target.getClass().getDeclaredFields();
    for (Field field : paramMap) {
      String resultName = field.getName();
      String value = getFieldValue(field, target);
      if (value != null) {
        JsonProperty prop = field.getAnnotation(JsonProperty.class);
        if (prop != null) {
          resultMap.put(prop.value(), getFieldValue(field, target));
        } else {
          resultMap.put(resultName, getFieldValue(field, target));
        }
      }
    }
View Full Code Here

Examples of org.codehaus.jackson.annotate.JsonProperty

        for (int j = 0; j < as.length; j++) {
          Annotation a = as[j];
          //TODO handle http://docs.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html
          //https://github.com/joshbeitelspacher/jackson-extensions/blob/master/src/main/java/com/netbeetle/jackson/ConstructorPropertiesAnnotationIntrospector.java
          if (JsonProperty.class.equals(a.annotationType())) {
            JsonProperty p = (JsonProperty) a;
            String value = p.value();
            final SqlParameterDefinition definition = parameterDef(config, k, value, parameterType, i);
            parameters.put(value, definition);
          }
        }
      }
View Full Code Here

Examples of org.codehaus.jackson.annotate.JsonProperty

        for (int j = 0; j < as.length; j++) {
          Annotation a = as[j];
          //TODO handle http://docs.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html
          //https://github.com/joshbeitelspacher/jackson-extensions/blob/master/src/main/java/com/netbeetle/jackson/ConstructorPropertiesAnnotationIntrospector.java
          if (JsonProperty.class.equals(a.annotationType())) {
            JsonProperty p = (JsonProperty) a;
            String value = p.value();
            final SqlParameterDefinition definition = parameterDef(config, k, value, parameterType, i);
            parameters.put(value, definition);
          }
        }
      }
View Full Code Here

Examples of org.codehaus.jackson.annotate.JsonProperty

        for (int j = 0; j < as.length; j++) {
          Annotation a = as[j];
          //TODO handle http://docs.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html
          //https://github.com/joshbeitelspacher/jackson-extensions/blob/master/src/main/java/com/netbeetle/jackson/ConstructorPropertiesAnnotationIntrospector.java
          if (JsonProperty.class.equals(a.annotationType())) {
            JsonProperty p = (JsonProperty) a;
            String value = p.value();
            final SqlParameterDefinition definition = parameterDef(config, k, value, parameterType, i);
            parameters.put(value, definition);
          }
        }
      }
View Full Code Here

Examples of org.codehaus.jackson.annotate.JsonProperty

        RiakKey key = null;
        RiakUsermeta usermeta = null;
        RiakLinks links = null;
        RiakIndex index = null;
        RiakVClock vclock = null;
    JsonProperty jacksonJsonProperty = null;

        AnnotatedMember member = beanPropertyWriter.getMember();
        if (member instanceof AnnotatedField) {
            AnnotatedElement element = member.getAnnotated();
            key = element.getAnnotation(RiakKey.class);
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.