Tabnine Logo
Gson.fieldNamingStrategy
Code IndexAdd Tabnine to your IDE (free)

How to use
fieldNamingStrategy
method
in
com.google.gson.Gson

Best Java code snippets using com.google.gson.Gson.fieldNamingStrategy (Showing top 7 results out of 315)

origin: immutables/immutables

 @Override
 public String translateName(Member member) {
  return gson.fieldNamingStrategy().translateName((Field) member);
 }
}
origin: org.immutables/mongo

 @Override
 public String translateName(Member member) {
  return gson.fieldNamingStrategy().translateName((Field) member);
 }
}
origin: net.sf.sprockets/sprockets

 private static String translateName(Gson gson, Class<?> sampleClass, String fieldName) {
  try {
   return gson.fieldNamingStrategy().translateName(sampleClass.getField(fieldName));
  } catch (NoSuchFieldException noSuchField) {
   throw new AssertionError(noSuchField);
  }
 }
}
origin: danielnorberg/auto-matter

private String translateField(final Gson gson, final String fieldName, final Class<?> valueClass) {
 final Field field;
 try {
  field = valueClass.getDeclaredField(fieldName);
 } catch (NoSuchFieldException e) {
  throw new RuntimeException(e);
 }
 return gson.fieldNamingStrategy().translateName(field);
}
origin: org.lastaflute/lastaflute

protected LaReflectiveTypeAdapterFactory createReflectiveTypeAdapterFactory(Gson newGson, Object factory) {
  final ConstructorConstructor constructorConstructor = getConstructorConstructor(factory);
  final JsonAdapterAnnotationTypeAdapterFactory jsonAdapterFactory = getJsonAdapterFactory(factory);
  final FieldNamingStrategy fieldNamingStrategy = newGson.fieldNamingStrategy();
  final Excluder excluder = newGson.excluder();
  return new LaReflectiveTypeAdapterFactory(constructorConstructor, fieldNamingStrategy, excluder, jsonAdapterFactory);
}
origin: lastaflute/lastaflute

protected LaReflectiveTypeAdapterFactory createReflectiveTypeAdapterFactory(Gson newGson, Object factory) {
  final ConstructorConstructor constructorConstructor = getConstructorConstructor(factory);
  final JsonAdapterAnnotationTypeAdapterFactory jsonAdapterFactory = getJsonAdapterFactory(factory);
  final FieldNamingStrategy fieldNamingStrategy = newGson.fieldNamingStrategy();
  final Excluder excluder = newGson.excluder();
  return new LaReflectiveTypeAdapterFactory(constructorConstructor, fieldNamingStrategy, excluder, jsonAdapterFactory);
}
origin: leangen/graphql-spqr

String fieldName = gson.fieldNamingStrategy().translateName(field);
InputField inputField = new InputField(fieldName, getDescription(field, params.getEnvironment().messageBundle),
    fieldType, null, defaultValue(field, fieldType, params.getEnvironment()), (AnnotatedElement) target);
com.google.gsonGsonfieldNamingStrategy

Popular methods of Gson

  • fromJson
    This method deserializes the specified Json into an object of the specified type. This method is use
  • toJson
    This method serializes the specified object, including those of generic types, into its equivalent J
  • <init>
  • toJsonTree
    This method serializes the specified object, including those of generic types, into its equivalent r
  • getAdapter
    Returns the type adapter for type.
  • getDelegateAdapter
    This method is used to get an alternate type adapter for the specified type. This is used to access
  • newJsonWriter
    Returns a new JSON writer configured for this GSON and with the non-execute prefix if that is config
  • newJsonReader
    Returns a new JSON reader configured for the settings on this Gson instance.
  • assertFullConsumption
  • doubleAdapter
  • floatAdapter
  • longAdapter
  • floatAdapter,
  • longAdapter,
  • toString,
  • atomicLongAdapter,
  • atomicLongArrayAdapter,
  • checkValidFloatingPoint,
  • excluder,
  • newBuilder,
  • fromGson

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JLabel (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • From CI to AI: The AI layer in your organization
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