public class SimplePOJODataMapper extends Object implements SULMapper<MethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>
SULMapper.MappedException<AO>| Modifier | Constructor and Description |
|---|---|
protected |
SimplePOJODataMapper(Constructor<?> initMethod,
Object... initParams) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFork()
Checks whether it is possible to
fork this mapper. |
SULMapper<MethodInput,AbstractMethodOutput,ConcreteMethodInput,Object> |
fork()
Forks this mapper, i.e., returns a mapper that behaves in exactly the same way as this mapper, but allows for
being used independently of this mapper.
|
ConcreteMethodInput |
mapInput(MethodInput 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.
|
SULMapper.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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmapWrappedExceptionprotected Object delegate
protected SimplePOJODataMapper(Constructor<?> initMethod, Object... initParams)
public void pre()
Mapperpre in interface Mapper<MethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>public void post()
Mapperpost in interface Mapper<MethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>public SULMapper.MappedException<? extends AbstractMethodOutput> mapUnwrappedException(RuntimeException exception) throws RuntimeException
SULMapperRuntimeException to an abstract output symbol, or rethrows it if it is unmappable.mapUnwrappedException in interface SULMapper<MethodInput,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
exceptionpublic ConcreteMethodInput mapInput(MethodInput abstractInput)
MappermapInput in interface Mapper<MethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>abstractInput - the abstract inputpublic AbstractMethodOutput mapOutput(Object concreteOutput)
MappermapOutput in interface Mapper<MethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>concreteOutput - the concrete outputpublic boolean canFork()
SULMapperfork this mapper.canFork in interface SULMapper<MethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>true if this mapper can be forked, false otherwise.public SULMapper<MethodInput,AbstractMethodOutput,ConcreteMethodInput,Object> fork()
SULMapper
If SULMapper.canFork() returned false, this method must throw an UnsupportedOperationException.
Otherwise, it must return a non-null object representing the fork of this mapper.
fork in interface SULMapper<MethodInput,AbstractMethodOutput,ConcreteMethodInput,Object>this should be returned)Copyright © 2018. All rights reserved.