Groovy Documentation

org.codehaus.groovy.grails.plugins.converters.api
[Java] Class ConvertersApi

java.lang.Object
  org.codehaus.groovy.grails.plugins.converters.api.ConvertersApi
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware

public class ConvertersApi
extends java.lang.Object

The API for converting objects to target types such as XML.

Authors:
Graeme Rocher
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
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

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 instance
clazz - 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)


 

Groovy Documentation