Z - Throwable typepublic interface ExceptionChainer<Z extends Throwable>
ExceptionChainer<SomeException> chainer = new ExceptionChainer<SomeException>()
{
public SomeException chain(Throwable t)
{
if (t instanceof SomeException)
return (SomeException) t;
else
return new SomeExcepion(t);
}
};
Copyright © 2009–2013. All rights reserved.