com.fasterxml.jackson.annotation.JsonFormat.java Source code

Java tutorial

Introduction

Here is the source code for com.fasterxml.jackson.annotation.JsonFormat.java

Source

  package com.fasterxml.jackson.annotation;

  import java.lang.annotation.Annotation;
  import java.lang.annotation.Retention;
  import java.lang.annotation.RetentionPolicy;
  import java.lang.annotation.Target;
  import java.util.Locale;
  import java.util.TimeZone;

  @Retention(RetentionPolicy.RUNTIME)
  @Target({ java.lang.annotation.ElementType.ANNOTATION_TYPE, java.lang.annotation.ElementType.FIELD,
          java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER,
          java.lang.annotation.ElementType.TYPE })
  public @interface JsonFormat {
      public abstract String locale();

      public abstract String pattern();

      public abstract Shape shape();

      public abstract String timezone();

public static enum Shape
{
  static
  {
    ARRAY = new Shape("ARRAY", 2);
    OBJECT = new Shape("OBJECT", 3);
    NUMBER = new Shape("NUMBER", 4);
    NUMBER_FLOAT = new Shape("NUMBER_FLOAT", 5);
    NUMBER_INT = new Shape("NUMBER_INT", 6);
    STRING = new Shape("STRING", 7);
    BOOLEAN = new Shape("BOOLEAN", 8);
    Shape[] arrayOfShape = new Shape[9];
    arrayOfShape[0] = ANY;
    arrayOfShape[1] = SCALAR;
    arrayOfShape[2] = ARRAY;
    arrayOfShape[3] = OBJECT;
    arrayOfShape[4] = NUMBER;
    arrayOfShape[5] = NUMBER_FLOAT;
    arrayOfShape[6] = NUMBER_INT;
    arrayOfShape[7] = STRING;
    arrayOfShape[8] = BOOLEAN;
  }

  public boolean isNumeric()
  {
    return (this == NUMBER) || (this == NUMBER_INT) || (this == NUMBER_FLOAT);
  }
}

      public static class Value {
          private final Locale locale;
          private final String pattern;
          private final JsonFormat.Shape shape;
          private final TimeZone timezone;

          public Value() {
              this("", JsonFormat.Shape.ANY, "", "");
          }

          public Value(JsonFormat paramJsonFormat) {
              this(paramJsonFormat.pattern(), paramJsonFormat.shape(), paramJsonFormat.locale(),
                      paramJsonFormat.timezone());
          }

          public Value(String paramString1, JsonFormat.Shape paramShape, String paramString2, String paramString3) {
          }

          public Value(String paramString, JsonFormat.Shape paramShape, Locale paramLocale, TimeZone paramTimeZone) {
              this.pattern = paramString;
              this.shape = paramShape;
              this.locale = paramLocale;
              this.timezone = paramTimeZone;
          }

          public Locale getLocale() {
              return this.locale;
          }

          public String getPattern() {
              return this.pattern;
          }

          public JsonFormat.Shape getShape() {
              return this.shape;
          }

          public TimeZone getTimeZone() {
              return this.timezone;
          }
      }
  }

  /* Location:           /Users/dantheman/src/fffffffffattttt/basis/classes_dex2jar.jar
   * Qualified Name:     com.fasterxml.jackson.annotation.JsonFormat
   * JD-Core Version:    0.6.2
   */