AI
- abstract input symbol typeAO
- abstract output symbol typeCI
- concrete input symbol typeCO
- concrete output symbol typepublic abstract class AbstractMapper<AI,AO,CI,CO> extends Object implements Mapper<AI,AO,CI,CO>
Mapper
.
This class comes with the following default behavior:
pre()
and post()
do nothing.SULException
occurs, it is treated like an ordinary RuntimeException
and hence passed to mapUnwrappedException(RuntimeException)
.Mapper.MappedException<AO>
Constructor and Description |
---|
AbstractMapper() |
Modifier and Type | Method and Description |
---|---|
Mapper.MappedException<? extends AO> |
mapUnwrappedException(RuntimeException exception)
Maps an unwrapped
RuntimeException to an abstract output symbol, or rethrows
it if it is unmappable. |
Mapper.MappedException<? extends AO> |
mapWrappedException(SULException exception)
Maps a wrapped
SULException 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.
|
public void pre()
Mapper
public void post()
Mapper
public Mapper.MappedException<? extends AO> mapWrappedException(SULException exception) throws SULException
Mapper
SULException
to an abstract output symbol, or rethrows it
if it is unmappable.mapWrappedException
in interface Mapper<AI,AO,CI,CO>
exception
- the wrapped exception that was thrownSULException
- if the exception cannot be mapped, or if a new exception
occurs while trying to map the given exceptionpublic Mapper.MappedException<? extends AO> mapUnwrappedException(RuntimeException exception) throws SULException, RuntimeException
Mapper
RuntimeException
to an abstract output symbol, or rethrows
it if it is unmappable.mapUnwrappedException
in interface Mapper<AI,AO,CI,CO>
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.