public class SimplePOJODataMapper extends AbstractMapper<AbstractMethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>
Mapper.MappedException<AO>
Modifier | Constructor and Description |
---|---|
protected |
SimplePOJODataMapper(Constructor<?> initMethod,
Object... initParams) |
Modifier and Type | Method and Description |
---|---|
ConcreteMethodInput |
mapInput(AbstractMethodInput abstractInput)
Method that maps an abstract input to a corresponding concrete input.
|
AbstractMethodOutput |
mapOutput(Object concreteOutput)
Method that maps a concrete output to a corresponding abstract output.
|
Mapper.MappedException<? extends AbstractMethodOutput> |
mapUnwrappedException(RuntimeException exception)
Maps an unwrapped
RuntimeException to an abstract output symbol, or rethrows
it if it is unmappable. |
void |
post()
Method that is invoked after all translation steps on a word are performed.
|
void |
pre()
Method that is invoked before any translation steps on a word are performed.
|
mapWrappedException
protected Object _this
protected SimplePOJODataMapper(Constructor<?> initMethod, Object... initParams)
public void pre()
Mapper
pre
in interface Mapper<AbstractMethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>
pre
in class AbstractMapper<AbstractMethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>
public void post()
Mapper
post
in interface Mapper<AbstractMethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>
post
in class AbstractMapper<AbstractMethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>
public ConcreteMethodInput mapInput(AbstractMethodInput abstractInput)
Mapper
abstractInput
- the abstract inputpublic AbstractMethodOutput mapOutput(Object concreteOutput)
Mapper
concreteOutput
- the concrete outputpublic Mapper.MappedException<? extends AbstractMethodOutput> mapUnwrappedException(RuntimeException exception) throws SULException, RuntimeException
Mapper
RuntimeException
to an abstract output symbol, or rethrows
it if it is unmappable.mapUnwrappedException
in interface Mapper<AbstractMethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>
mapUnwrappedException
in class AbstractMapper<AbstractMethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>
exception
- the runtime exception that was thrownSULException
- if a new exception occurs while trying to map the given exceptionRuntimeException
- if the given exception cannot be mapped, or if a new
exception occurs while trying to map the given exceptionCopyright © 2015. All rights reserved.