org.glassfish.pfl.basic.logex
Class WrapperGenerator.ExtensionBase

java.lang.Object
  extended by 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
WrapperGenerator.ExtensionBase()
           
 
Method Summary
 String getLoggerName(Class<?> cls)
          Modify the default logger name if needed.
 String getLogId(Method method)
          Get a message id for this log.
 Throwable makeException(String msg, Method method)
          Construct an exception from the message and the exception type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrapperGenerator.ExtensionBase

public WrapperGenerator.ExtensionBase()
Method Detail

getLogId

public String getLogId(Method method)
Description copied from interface: WrapperGenerator.Extension
Get a message id for this log.

Specified by:
getLogId in interface WrapperGenerator.Extension
Parameters:
method - The method defining this log.
Returns:
The message id.

makeException

public Throwable makeException(String msg,
                               Method method)
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 interface WrapperGenerator.Extension
Parameters:
msg - The message to use in the exception.
method - The method creating the exception.

getLoggerName

public String getLoggerName(Class<?> cls)
Description copied from interface: WrapperGenerator.Extension
Modify the default logger name if needed.

Specified by:
getLoggerName in interface WrapperGenerator.Extension
Parameters:
cls - The standard logger name
Returns:
A possibly updated logger name


Copyright © 2013 Oracle. All Rights Reserved.