|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.util.coerce.CoercionHandler
org.jboss.util.coerce.BoundCoercionHandler
org.jboss.util.coerce.ClassHandler
public class ClassHandler
A java.lang.Class coercion handler.
| Constructor Summary | |
|---|---|
ClassHandler()
|
|
| Method Summary | |
|---|---|
Object |
coerce(Object value,
Class type)
Coerces the given value into the given type (which should be Class). |
Object |
coerce(String value)
Coerces the given String into a Class by doing a Class.forName(). |
Class |
getType()
Get the target class type for this CoercionHandler. |
| Methods inherited from class org.jboss.util.coerce.CoercionHandler |
|---|
create, install, install, isInstalled, lookup, uninstall |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassHandler()
| Method Detail |
|---|
public Class getType()
getType in class BoundCoercionHandler
public Object coerce(Object value,
Class type)
throws CoercionException
This currently only support coercion from a String.
coerce in class CoercionHandlervalue - Value to coerce.type - java.lang.Class.
CoercionException - Failed to coerce.public Object coerce(String value)
Class.forName().
value - String value to convert to a Class.
NotCoercibleException - Class not found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||