|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.velocity.util.DuckType
public class DuckType
Support for getAs
Nested Class Summary
protected static classDuckType.Types
Field Summary
protected static ObjectNO_METHOD
Constructor Summary
DuckType()
Method Summary
static booleanasBoolean(Object value)
static booleanasBoolean(Object value,
boolean coerceType)
static booleanasEmpty(Object value)
static booleanasNull(Object value)
static NumberasNumber(Object value)
static NumberasNumber(Object value,
boolean coerceType)
static StringasString(Object value)
static StringasString(Object value,
boolean coerceType)
protected static MethodfindMethod(Class c,
DuckType.Types type)
protected static Objectget(Object value,
DuckType.Types type)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
NO_METHOD
protected static final Object NO_METHOD
Constructor Detail
DuckType
public DuckType()
Method Detail
asString
public static String asString(Object value)
asString
public static String asString(Object value,
boolean coerceType)
asNull
public static boolean asNull(Object value)
asBoolean
public static boolean asBoolean(Object value)
asBoolean
public static boolean asBoolean(Object value,
boolean coerceType)
asEmpty
public static boolean asEmpty(Object value)
asNumber
public static Number asNumber(Object value)
asNumber
public static Number asNumber(Object value,
boolean coerceType)
get
protected static Object get(Object value,
DuckType.Types type)
findMethod
protected static Method findMethod(Class c,
DuckType.Types type)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.