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

    • Running tasks concurrently on multiple threads
    • notifyDataSetChanged (ArrayAdapter)
    • getSharedPreferences (Context)
    • runOnUiThread (Activity)
    • MalformedURLException (java.net)
      This exception is thrown when a program attempts to create an URL from an incorrect specification.
    • Charset (java.nio.charset)
      A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
    • Permission (java.security)
      Legacy security code; do not use.
    • Iterator (java.util)
      An iterator over a sequence of objects, such as a collection.If a collection has been changed since
    • ConcurrentHashMap (java.util.concurrent)
      A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
    • JFrame (javax.swing)
    • Top 17 PhpStorm Plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

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