Codota Logo
com.google.gson.internal.bind
Code IndexAdd Codota to your IDE (free)

How to use com.google.gson.internal.bind

Best Java code snippets using com.google.gson.internal.bind (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: immutables/immutables

 @Override
 public JsonReader create() {
  return new JsonTreeReader(element);
 }
}
origin: jgilfelt/chuck

  public static Gson getInstance() {
    if (gson == null) {
      gson = new GsonBuilder()
          .setPrettyPrinting()
          .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
          .registerTypeAdapter(Date.class, new DateTypeAdapter())
          .create();
    }
    return gson;
  }
}
origin: camunda/camunda-bpm-platform

public Adapter(Gson context, Type keyType, TypeAdapter<K> keyTypeAdapter,
  Type valueType, TypeAdapter<V> valueTypeAdapter,
  ObjectConstructor<? extends Map<K, V>> constructor) {
 this.keyTypeAdapter =
  new TypeAdapterRuntimeTypeWrapper<K>(context, keyTypeAdapter, keyType);
 this.valueTypeAdapter =
  new TypeAdapterRuntimeTypeWrapper<V>(context, valueTypeAdapter, valueType);
 this.constructor = constructor;
}
origin: camunda/camunda-bpm-platform

@Override public void nextNull() throws IOException {
 expect(JsonToken.NULL);
 popStack();
 if (stackSize > 0) {
  pathIndices[stackSize - 1]++;
 }
}
origin: camunda/camunda-bpm-platform

@Override public void skipValue() throws IOException {
 if (peek() == JsonToken.NAME) {
  nextName();
  pathNames[stackSize - 2] = "null";
 } else {
  popStack();
  if (stackSize > 0) {
   pathNames[stackSize - 1] = "null";
  }
 }
 if (stackSize > 0) {
  pathIndices[stackSize - 1]++;
 }
}
origin: camunda/camunda-bpm-platform

@Override public JsonWriter value(Boolean value) throws IOException {
 if (value == null) {
  return nullValue();
 }
 put(new JsonPrimitive(value));
 return this;
}
origin: camunda/camunda-bpm-platform

public boolean excludeField(Field f, boolean serialize) {
 return excludeField(f, serialize, excluder);
}
origin: camunda/camunda-bpm-platform

 @SuppressWarnings("unchecked") // we use a runtime check to make sure the 'T's equal
 @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> typeToken) {
  return typeToken.getRawType() == java.sql.Date.class
    ? (TypeAdapter<T>) new SqlDateTypeAdapter() : null;
 }
};
origin: camunda/camunda-bpm-platform

@Override public JsonWriter nullValue() throws IOException {
 put(JsonNull.INSTANCE);
 return this;
}
origin: camunda/camunda-bpm-platform

@Override public boolean hasNext() throws IOException {
 JsonToken token = peek();
 return token != JsonToken.END_OBJECT && token != JsonToken.END_ARRAY;
}
origin: camunda/camunda-bpm-platform

/**
 * Returns a new factory that will match each type's raw type for assignability
 * to {@code hierarchyType}.
 */
public static TypeAdapterFactory newTypeHierarchyFactory(
  Class<?> hierarchyType, Object typeAdapter) {
 return new SingleTypeFactory(typeAdapter, null, false, hierarchyType);
}
origin: camunda/camunda-bpm-platform

public JsonTreeReader(JsonElement element) {
 super(UNREADABLE_READER);
 push(element);
}
origin: camunda/camunda-bpm-platform

 private String locationString() {
  return " at path " + getPath();
 }
}
origin: camunda/camunda-bpm-platform

@Override public void endObject() throws IOException {
 expect(JsonToken.END_OBJECT);
 popStack(); // empty iterator
 popStack(); // object
 if (stackSize > 0) {
  pathIndices[stackSize - 1]++;
 }
}
origin: camunda/camunda-bpm-platform

 @SuppressWarnings("unchecked") // we use a runtime check to make sure the 'T's equal
 @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> typeToken) {
  return typeToken.getRawType() == Date.class ? (TypeAdapter<T>) new DateTypeAdapter() : null;
 }
};
origin: camunda/camunda-bpm-platform

public Adapter(Gson context, Type elementType,
  TypeAdapter<E> elementTypeAdapter,
  ObjectConstructor<? extends Collection<E>> constructor) {
 this.elementTypeAdapter =
   new TypeAdapterRuntimeTypeWrapper<E>(context, elementTypeAdapter, elementType);
 this.constructor = constructor;
}
origin: camunda/camunda-bpm-platform

/**
 * Returns a new factory that will match each type against {@code exactType}.
 */
public static TypeAdapterFactory newFactory(TypeToken<?> exactType, Object typeAdapter) {
 return new SingleTypeFactory(typeAdapter, exactType, false, null);
}
origin: camunda/camunda-bpm-platform

@Override public void endArray() throws IOException {
 expect(JsonToken.END_ARRAY);
 popStack(); // empty iterator
 popStack(); // array
 if (stackSize > 0) {
  pathIndices[stackSize - 1]++;
 }
}
origin: camunda/camunda-bpm-platform

public ArrayTypeAdapter(Gson context, TypeAdapter<E> componentTypeAdapter, Class<E> componentType) {
 this.componentTypeAdapter =
  new TypeAdapterRuntimeTypeWrapper<E>(context, componentTypeAdapter, componentType);
 this.componentType = componentType;
}
origin: camunda/camunda-bpm-platform

@Override public boolean nextBoolean() throws IOException {
 expect(JsonToken.BOOLEAN);
 boolean result = ((JsonPrimitive) popStack()).getAsBoolean();
 if (stackSize > 0) {
  pathIndices[stackSize - 1]++;
 }
 return result;
}
com.google.gson.internal.bind

Most used classes

  • ISO8601Utils
  • DateTypeAdapter
  • ReflectiveTypeAdapterFactory
    Type adapter that reflects over the fields and methods of a class.
  • TypeAdapters
    Type adapters for basic types.
  • TypeAdapterRuntimeTypeWrapper
  • CollectionTypeAdapterFactory,
  • JsonTreeReader,
  • JsonTreeWriter,
  • MapTypeAdapterFactory,
  • ReflectiveTypeAdapterFactory$Adapter,
  • ReflectiveTypeAdapterFactory$BoundField,
  • SqlDateTypeAdapter,
  • CollectionTypeAdapterFactory$Adapter,
  • MapTypeAdapterFactory$Adapter,
  • ObjectTypeAdapter,
  • TimeTypeAdapter,
  • TypeAdapters$EnumTypeAdapter,
  • JsonAdapterAnnotationTypeAdapterFactory,
  • TreeTypeAdapter
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now