_Type_ - the parameter type (must match the parameter type in the factory method)public class LogParameter<_Type_> extends Object
LogParameter encapsulates a parameter that is passed to a logger factory method at the of injection.
It does not necessarily represent a constant value but may vary according to the injection point. For example,
currentClass() and currentClassName() refer to the Class object and class name at the
injection point, not to class that creates the LogParameter.| Modifier and Type | Method and Description |
|---|---|
static LogParameter<String> |
constantString(String string)
Returns a
LogParameter representing a constant string (always the same string, independent of injection
point). |
static LogParameter<Class<?>> |
currentClass() |
static LogParameter<String> |
currentClassName() |
Class<_Type_> |
getParameterType() |
_Type_ |
getValue(Class<?> currentClass)
Determines the parameter's value for the current injection point.
|
static <_Parameter_> |
parameter(_Parameter_ parameter)
Returns a
LogParameter representing a constant value (always the same value, independent of injection
point). |
public static LogParameter<Class<?>> currentClass()
LogParameter representing the Class into which the logger is injected.public static LogParameter<String> currentClassName()
LogParameter representing the name of the Class into which the logger is injected.public static LogParameter<String> constantString(String string)
LogParameter representing a constant string (always the same string, independent of injection
point).string - the constant stringLogParameterpublic static <_Parameter_> LogParameter<_Parameter_> parameter(_Parameter_ parameter)
LogParameter representing a constant value (always the same value, independent of injection
point)._Parameter_ - the log parameter typeparameter - the valueLogParameterCopyright © 2016. All rights reserved.