congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Enum$Field.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
org.apache.shindig.protocol.model.Enum$Field

Best Java code snippets using org.apache.shindig.protocol.model.Enum$Field.toString (Showing top 5 results out of 315)

origin: com.lmco.shindig/shindig-common

private Enum<Enum.EnumKey> convertToOsEnum(JSONObject json, Class<?> enumKeyType) {
 Enum<Enum.EnumKey> value;
 String val = Enum.Field.VALUE.toString();
 String display = Enum.Field.DISPLAY_VALUE.toString();
 if (json.has(val)) {
  Enum.EnumKey enumKey;
  try {
   enumKey = (Enum.EnumKey) enumKeyType.getField(json.optString(val)).get(null);
  } catch (IllegalArgumentException e) {
   throw new RuntimeException(e);
  } catch (SecurityException e) {
   throw new RuntimeException(e);
  } catch (IllegalAccessException e) {
   throw new RuntimeException(e);
  } catch (NoSuchFieldException e) {
   throw new RuntimeException(e);
  }
  String displayValue = null;
  if (json.has(display)) {
   displayValue = json.optString(display);
  }
  value = new EnumImpl<Enum.EnumKey>(enumKey,displayValue);
 } else {
  value = new EnumImpl<Enum.EnumKey>(null, json.optString(display));
 }
 return value;
}
origin: org.apache.shindig/shindig-common

private Enum<Enum.EnumKey> convertToOsEnum(JSONObject json, Class<?> enumKeyType) {
 Enum<Enum.EnumKey> value;
 String val = Enum.Field.VALUE.toString();
 String display = Enum.Field.DISPLAY_VALUE.toString();
 if (json.has(val)) {
  Enum.EnumKey enumKey;
  try {
   enumKey = (Enum.EnumKey) enumKeyType.getField(json.optString(val)).get(null);
  } catch (IllegalArgumentException e) {
   throw new RuntimeException(e);
  } catch (SecurityException e) {
   throw new RuntimeException(e);
  } catch (IllegalAccessException e) {
   throw new RuntimeException(e);
  } catch (NoSuchFieldException e) {
   throw new RuntimeException(e);
  }
  String displayValue = null;
  if (json.has(display)) {
   displayValue = json.optString(display);
  }
  value = new EnumImpl<Enum.EnumKey>(enumKey,displayValue);
 } else {
  value = new EnumImpl<Enum.EnumKey>(null, json.optString(display));
 }
 return value;
}
origin: org.wso2.org.apache.shindig/shindig-common

private Enum<Enum.EnumKey> convertToOsEnum(JSONObject json, Class<?> enumKeyType) {
 Enum<Enum.EnumKey> value;
 String val = Enum.Field.VALUE.toString();
 String display = Enum.Field.DISPLAY_VALUE.toString();
 if (json.has(val)) {
  Enum.EnumKey enumKey;
  try {
   enumKey = (Enum.EnumKey) enumKeyType.getField(json.optString(val)).get(null);
  } catch (IllegalArgumentException e) {
   throw new RuntimeException(e);
  } catch (SecurityException e) {
   throw new RuntimeException(e);
  } catch (IllegalAccessException e) {
   throw new RuntimeException(e);
  } catch (NoSuchFieldException e) {
   throw new RuntimeException(e);
  }
  String displayValue = null;
  if (json.has(display)) {
   displayValue = json.optString(display);
  }
  value = new EnumImpl<Enum.EnumKey>(enumKey,displayValue);
 } else {
  value = new EnumImpl<Enum.EnumKey>(null, json.optString(display));
 }
 return value;
}
origin: apache/shindig

private Enum<Enum.EnumKey> convertToOsEnum(JSONObject json, Class<?> enumKeyType) {
 Enum<Enum.EnumKey> value;
 String val = Enum.Field.VALUE.toString();
 String display = Enum.Field.DISPLAY_VALUE.toString();
 if (json.has(val)) {
  Enum.EnumKey enumKey;
  try {
   enumKey = (Enum.EnumKey) enumKeyType.getField(json.optString(val)).get(null);
  } catch (IllegalArgumentException e) {
   throw new RuntimeException(e);
  } catch (SecurityException e) {
   throw new RuntimeException(e);
  } catch (IllegalAccessException e) {
   throw new RuntimeException(e);
  } catch (NoSuchFieldException e) {
   throw new RuntimeException(e);
  }
  String displayValue = null;
  if (json.has(display)) {
   displayValue = json.optString(display);
  }
  value = new EnumImpl<Enum.EnumKey>(enumKey,displayValue);
 } else {
  value = new EnumImpl<Enum.EnumKey>(null, json.optString(display));
 }
 return value;
}
origin: org.gatein.shindig/shindig-common

private Enum<Enum.EnumKey> convertToOsEnum(JSONObject json, Class<?> enumKeyType) {
 Enum<Enum.EnumKey> value;
 String val = Enum.Field.VALUE.toString();
 String display = Enum.Field.DISPLAY_VALUE.toString();
 if (json.has(val)) {
  Enum.EnumKey enumKey;
  try {
   enumKey = (Enum.EnumKey) enumKeyType.getField(json.optString(val)).get(null);
  } catch (IllegalArgumentException e) {
   throw new RuntimeException(e);
  } catch (SecurityException e) {
   throw new RuntimeException(e);
  } catch (IllegalAccessException e) {
   throw new RuntimeException(e);
  } catch (NoSuchFieldException e) {
   throw new RuntimeException(e);
  }
  String displayValue = null;
  if (json.has(display)) {
   displayValue = json.optString(display);
  }
  value = new EnumImpl<Enum.EnumKey>(enumKey,displayValue);
 } else {
  value = new EnumImpl<Enum.EnumKey>(null, json.optString(display));
 }
 return value;
}
org.apache.shindig.protocol.modelEnum$FieldtoString

Popular methods of Enum$Field

    Popular in Java

    • Making http post requests using okhttp
    • requestLocationUpdates (LocationManager)
    • findViewById (Activity)
    • getApplicationContext (Context)
    • ObjectMapper (com.fasterxml.jackson.databind)
      ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
    • BigInteger (java.math)
      An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
    • ConnectException (java.net)
      A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
    • MalformedURLException (java.net)
      This exception is thrown when a program attempts to create an URL from an incorrect specification.
    • HashMap (java.util)
      HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
    • Executors (java.util.concurrent)
      Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
    • Top plugins for WebStorm
    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