Codota Logo
ShindigTypeConverter
Code IndexAdd Codota to your IDE (free)

How to use
ShindigTypeConverter
in
org.apache.shindig.expressions

Best Java code snippets using org.apache.shindig.expressions.ShindigTypeConverter (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: apache/shindig

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 //  Nothing more we can do.
 return null;
}
origin: org.apache.shindig/shindig-common

@Override
public <T> T convert(Object obj, Class<T> type) throws ELException {
 T retValue = super.convert(obj, type);
 if (retValue == null) {
  retValue = TypeConverter.DEFAULT.convert(obj, type);
 }
 return retValue;
}
origin: apache/shindig

return coerceToIterable(childList);
origin: org.gatein.shindig/shindig-common

@Override
public <T> T convert(Object obj, Class<T> type) throws ELException {
 T retValue = super.convert(obj, type);
 if (retValue == null) {
  retValue = TypeConverter.DEFAULT.convert(obj, type);
 }
 return retValue;
}
origin: org.wso2.org.apache.shindig/shindig-common

return coerceToIterable(childList);
origin: org.gatein.shindig/shindig-common

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 
 //  Nothing more we can do.
 return null;
}
origin: org.wso2.org.apache.shindig/shindig-common

@Override
public <T> T convert(Object obj, Class<T> type) throws ELException {
 T retValue = super.convert(obj, type);
 if (retValue == null) {
  retValue = TypeConverter.DEFAULT.convert(obj, type);
 }
 return retValue;
}
origin: org.apache.shindig/shindig-common

return coerceToIterable(childList);
origin: com.lmco.shindig/shindig-common

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 
 //  Nothing more we can do.
 return null;
}
origin: apache/shindig

@Override
public <T> T convert(Object obj, Class<T> type) throws ELException {
 T retValue = super.convert(obj, type);
 if (retValue == null) {
  retValue = TypeConverter.DEFAULT.convert(obj, type);
 }
 return retValue;
}
origin: org.gatein.shindig/shindig-common

return coerceToIterable(childList);
origin: org.apache.shindig/shindig-common

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 //  Nothing more we can do.
 return null;
}
origin: com.lmco.shindig/shindig-common

@Override
public <T> T convert(Object obj, Class<T> type) throws ELException {
 T retValue = super.convert(obj, type);
 if (retValue == null) {
  retValue = TypeConverter.DEFAULT.convert(obj, type);
 }
 return retValue;
}
origin: com.lmco.shindig/shindig-common

return coerceToIterable(childList);
origin: org.wso2.org.apache.shindig/shindig-common

@SuppressWarnings("unchecked")
public <T> T convert(Object obj, Class<T> type) throws ELException {
 // Handle boolean specially
 if (type == Boolean.class || type == Boolean.TYPE) {
  return (T) coerceToBoolean(obj);
 }
 if (type == JSONArray.class) {
  return (T) coerceToJsonArray(obj);
 }
 if (type == Iterable.class) {
  return (T) coerceToIterable(obj);
 }
 //  Nothing more we can do.
 return null;
}
org.apache.shindig.expressionsShindigTypeConverter

Javadoc

Custom type converter class that overrides the default EL coercion rules where necessary. Specifically, Booleans are handled differently, and JSONArray is supported.

Most used methods

  • coerceToBoolean
    Coerce the following booleans: null -> false empty string, and "false" -> false boolean false -> fal
  • coerceToIterable
    Coerce objects to iterables. Iterables and JSONArrays have the obvious coercion. JSONObjects are coe
  • coerceToJsonArray
  • convert

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • JCheckBox (javax.swing)
  • JLabel (javax.swing)
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