|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object extended by org.jopendocument.util.cc.ExnTransformer<E,T,X>
E - input typeT - return typeX - exception typepublic abstract class ExnTransformer<E,T,X extends Exception>
Transformer able to throw an exception.
| Constructor Summary | |
|---|---|
ExnTransformer()
|
|
| Method Summary | ||
|---|---|---|
Object |
transform(Object input)
|
|
abstract T |
transformChecked(E input)
|
|
|
transformCheckedWithExn(E input,
boolean wrapRT,
Class<Y> exnClass,
Class<Z> exnClass2,
Class<A> exnClass3)
Execute this transformer, wrapping exceptions thrown by transformChecked(Object)
into one of the passed exception classes. |
|
|
transformCheckedWithExn(E input,
Class<Y> exnClass)
Execute this transformer, making sure that an exception of type exnClass is
thrown. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExnTransformer()
| Method Detail |
|---|
public final Object transform(Object input)
transform in interface org.apache.commons.collections.Transformerpublic final <Y extends Exception> T transformCheckedWithExn(E input, Class<Y> exnClass) throws Y extends Exception
exnClass is
thrown.
Y - type of exception to throw.input - the input.exnClass - class exception to throw.
Y - if transformChecked(Object) throws an exception, it will be wrapped (if
necessary) in an exception of class exnClass.
Y extends Exceptionpublic final <Y extends Exception,Z extends Exception,A extends Exception> T transformCheckedWithExn(E input, boolean wrapRT, Class<Y> exnClass, Class<Z> exnClass2, Class<A> exnClass3) throws Y extends Exception, Z extends Exception, A extends Exception
transformChecked(Object)
into one of the passed exception classes.
Y - type of exception to throw.Z - second type of exception to throw.A - third type of exception to throw.input - the input.wrapRT - true so that even RuntimeException are wrapped into
Y, false if this method should throw them as they are.exnClass - class exception to throw.exnClass2 - class exception to throw, can be null.exnClass3 - class exception to throw, can be null.
Y - if transformChecked(Object) throws an exception, it will be wrapped (if
necessary) in an exception of class exnClass.
Z - if transformChecked(Object) throws an exception of class Z.
A - if transformChecked(Object) throws an exception of class A.
Y extends Exceptionpublic abstract T transformChecked(E input) throws X extends Exception
transformChecked in interface ITransformerExn<E,T,X extends Exception>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||