org.codehaus.groovy.grails.plugins.converters.api
Class ConvertersApi
java.lang.Object
org.codehaus.groovy.grails.plugins.converters.api.ConvertersApi
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
public class ConvertersApi
- extends java.lang.Object
- implements org.springframework.context.ApplicationContextAware
The API for converting objects to target types such as XML.
- Since:
- 2.0
|
Method Summary |
java.lang.Object |
asType(java.lang.Object instance,
java.lang.Class<?> clazz)
Converter an instance from one format to another |
org.springframework.context.ApplicationContext |
getApplicationContext()
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConvertersApi
public ConvertersApi()
asType
public java.lang.Object asType(java.lang.Object instance,
java.lang.Class<?> clazz)
- Converter an instance from one format to another
- Parameters:
instance - The instanceclazz - The type to convert to
- Returns:
- the converted object
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException