Tabnine Logo
InputFieldJsonWriter.writeMap
Code IndexAdd Tabnine to your IDE (free)

How to use
writeMap
method
in
com.apollographql.apollo.internal.json.InputFieldJsonWriter

Best Java code snippets using com.apollographql.apollo.internal.json.InputFieldJsonWriter.writeMap (Showing top 1 results out of 315)

origin: apollographql/apollo-android

@SuppressWarnings("unchecked")
@Override public void writeCustom(@NotNull String fieldName, ScalarType scalarType, Object value) throws IOException {
 checkNotNull(fieldName, "fieldName == null");
 if (value != null) {
  CustomTypeAdapter customTypeAdapter = scalarTypeAdapters.adapterFor(scalarType);
  CustomTypeValue customTypeValue = customTypeAdapter.encode(value);
  if (customTypeValue instanceof CustomTypeValue.GraphQLString) {
   writeString(fieldName, ((CustomTypeValue.GraphQLString) customTypeValue).value);
  } else if (customTypeValue instanceof CustomTypeValue.GraphQLBoolean) {
   writeBoolean(fieldName, ((CustomTypeValue.GraphQLBoolean) customTypeValue).value);
  } else if (customTypeValue instanceof CustomTypeValue.GraphQLNumber) {
   writeNumber(fieldName, ((CustomTypeValue.GraphQLNumber) customTypeValue).value);
  } else if (customTypeValue instanceof CustomTypeValue.GraphQLJsonString) {
   writeString(fieldName, ((CustomTypeValue.GraphQLJsonString) customTypeValue).value);
  } else if (customTypeValue instanceof CustomTypeValue.GraphQLJson) {
   writeMap(fieldName, ((CustomTypeValue.GraphQLJson) customTypeValue).value);
  } else {
   throw new IllegalArgumentException("Unsupported custom value type: " + customTypeValue);
  }
 } else {
  jsonWriter.name(fieldName).nullValue();
 }
}
com.apollographql.apollo.internal.jsonInputFieldJsonWriterwriteMap

Popular methods of InputFieldJsonWriter

  • <init>
  • writeString
  • writeBoolean
  • writeNumber
  • writeCustom
  • writeDouble
  • writeInt
  • writeList
  • writeLong
  • writeObject

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JFrame (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now