Package org.apache.shindig.common

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


    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

  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

    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

TOP

Related Classes of org.apache.shindig.common.JsonProperty

Copyright © 2018 www.massapicom. 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.