S
- Source type for the conversionT
- Source typepublic class MethodToMarshaller<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 |
---|
MethodToMarshaller(Class<S> boundClass,
Class<T> targetClass,
Method marshal)
Create a new instance
|
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 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.