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.Extension
Get a message id for this log.- Specified by:
getLogId
in interfaceWrapperGenerator.Extension
- Parameters:
method
- The method defining this log.- Returns:
- The message id.
-
makeException
Description copied from interface:WrapperGenerator.Extension
Construct an exception from the message and the exception type. The method provides access to any additional annotations that may be needed.- Specified by:
makeException
in interfaceWrapperGenerator.Extension
- Parameters:
msg
- The message to use in the exception.method
- The method creating the exception.
-
getLoggerName
Description copied from interface:WrapperGenerator.Extension
Modify the default logger name if needed.- Specified by:
getLoggerName
in interfaceWrapperGenerator.Extension
- Parameters:
cls
- The standard logger name- Returns:
- A possibly updated logger name
-