S
- Source type for the conversionT
- Source typepublic class ConverterToMarshaller<S,T> extends Object implements ToMarshaller<S,T>
The marshal method must either
a) be instance scoped and defined as part of class S. It must accept no parameters and return a type of T. For example:
public String marshal()
b) be statically scoped. It must accept a single parameter of type S and return a type of T. For example:
public static String marshal(BoundType param)
Constructor and Description |
---|
ConverterToMarshaller(Converter<S,T> converter)
Create a new instance for the given converter
|
Modifier and Type | Method and Description |
---|---|
Class<S> |
getBoundClass()
Obtain the bound class
|
Class<T> |
getTargetClass()
Obtain the bound class
|
T |
marshal(S object)
Converts to the given object from the specified object
|
public ConverterToMarshaller(Converter<S,T> converter)
converter
- The converter to be wrappedpublic T marshal(S object)
marshal
in interface ToMarshaller<S,T>
object
- Object to transform, not nullpublic Class<S> getBoundClass()
getBoundClass
in interface ToMarshaller<S,T>
public Class<T> getTargetClass()
getTargetClass
in interface ToMarshaller<S,T>
Copyright © 2010–2018 Jadira Systems. All rights reserved.