Ken Cavanaugh - The Gmbal project
Ken Cavanaugh - The Gmbal project
Ken Cavanaugh - The Gmbal project
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
org.glassfish.gmbal.logex<br />
Uses an annotated interface to generate exceptions and log messages<br />
Also supports I18N for messages<br />
Example:<br />
@ExceptionWrapper( idPrefix="GMBALTLIB", resourceBundle = "org.glassfish.gmbal.logex.LogStrings" )<br />
public interface Exceptions {<br />
static final Exceptions self = WrapperGenerator.makeWrapper( Exceptions.class ) ;<br />
// Allow 100 exceptions per class<br />
static final int EXCEPTIONS_PER_CLASS = 100 ;<br />
// TypeEvaluator<br />
static final int TYPE_EVALUATOR_START = 1 ;<br />
@Message( "Internal error in TypeEvaluator" )<br />
@Log( id=TYPE_EVALUATOR_START + 0 )<br />
IllegalStateException internalTypeEvaluatorError( @Chain Exception exc ) ;<br />
}<br />
@Message( "evaluateType should not be called with a Method ({0})" )<br />
@Log( id=TYPE_EVALUATOR_START + 1 )<br />
IllegalArgumentException evaluateTypeCalledWithMethod( Object type ) ;<br />
Friday, December 11, 2009<br />
18