|
||||||||||
| 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.FileHandler
public class FileHandler
A java.io.File coercion handler.
| Constructor Summary | |
|---|---|
FileHandler()
|
|
| Method Summary | |
|---|---|
Object |
coerce(Object value,
Class type)
Coerces the given value into the given type (which should be File). |
Object |
coerce(String value)
Coerces the given String into a File by creating attempting to create a new file for the given filename. |
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 FileHandler()
| 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 - File.
CoercionException - Failed to coerce.public Object coerce(String value)
value - The name of the file to create.
NotCoercibleException - Failed to create file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||