Package org.glassfish.pfl.basic.logex
Class WrapperGenerator.ExtensionBase
java.lang.Object
org.glassfish.pfl.basic.logex.WrapperGenerator.ExtensionBase
- All Implemented Interfaces:
WrapperGenerator.Extension
- Enclosing class:
WrapperGenerator
public abstract static class WrapperGenerator.ExtensionBase
extends Object
implements WrapperGenerator.Extension
Convenience base class for implementations of Extension that don't
need to override every method.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLoggerName(Class<?> cls) Modify the default logger name if needed.Get a message id for this log.makeException(String msg, Method method) Construct an exception from the message and the exception type.
-
Constructor Details
-
ExtensionBase
public ExtensionBase()
-
-
Method Details
-
getLogId
Description copied from interface:WrapperGenerator.ExtensionGet a message id for this log.- Specified by:
getLogIdin interfaceWrapperGenerator.Extension- Parameters:
method- The method defining this log.- Returns:
- The message id.
-
makeException
Description copied from interface:WrapperGenerator.ExtensionConstruct an exception from the message and the exception type. The method provides access to any additional annotations that may be needed.- Specified by:
makeExceptionin interfaceWrapperGenerator.Extension- Parameters:
msg- The message to use in the exception.method- The method creating the exception.
-
getLoggerName
Description copied from interface:WrapperGenerator.ExtensionModify the default logger name if needed.- Specified by:
getLoggerNamein interfaceWrapperGenerator.Extension- Parameters:
cls- The standard logger name- Returns:
- A possibly updated logger name
-