public final class DeprecationSupport extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DeprecationSupport.ObjectType
Type of object, setting, feature, etc.
|
| Modifier and Type | Field and Description |
|---|---|
private static Logger |
LOG
Class logger.
|
static String |
LOG_CATEGORY
Log category name for warnings.
|
private static Set<String> |
WARNED_SET
Tracks issued warnings.
|
| Modifier | Constructor and Description |
|---|---|
private |
DeprecationSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
clearWarningState()
Clear the previously warned state.
|
static void |
warn(DeprecationSupport.ObjectType type,
String name,
String context,
String replacement)
Emit a deprecation warning for an object or feature of the system.
|
static void |
warnOnce(DeprecationSupport.ObjectType type,
String name,
String context,
String replacement)
Emit a deprecation warning for an object or feature of the system but limit to a single warning
for the life of the process or until state is cleared.
|
@Nonnull @NotEmpty public static final String LOG_CATEGORY
@Nonnull @NonnullElements private static final Set<String> WARNED_SET
public static void warn(@Nonnull DeprecationSupport.ObjectType type, @Nonnull@NotEmpty String name, @Nullable String context, @Nullable String replacement)
type - type of object or featurename - name of object or featurecontext - surrounding context for deprecation warningreplacement - the replacement for the deprecated featurepublic static void warnOnce(@Nonnull DeprecationSupport.ObjectType type, @Nonnull@NotEmpty String name, @Nullable String context, @Nullable String replacement)
type - type of object or featurename - name of object or featurecontext - surrounding context for deprecation warningreplacement - the replacement for the deprecated featurepublic static void clearWarningState()
Copyright © 1999–2020 Shibboleth Consortium. All rights reserved.