Class ScopedLoggingContext.ScopeList
- java.lang.Object
-
- com.google.common.flogger.context.ScopedLoggingContext.ScopeList
-
- Enclosing class:
- ScopedLoggingContext
public static final class ScopedLoggingContext.ScopeList extends Object
Lightweight internal helper class for context implementations to manage a list of scopes.
-
-
Constructor Summary
Constructors Constructor Description ScopeList(ScopeType key, LoggingScope scope, @Nullable ScopedLoggingContext.ScopeList next)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable ScopedLoggingContext.ScopeListaddScope(@Nullable ScopedLoggingContext.ScopeList list, @Nullable ScopeType type)Adds a new scope to the list for the given type.static @Nullable LoggingScopelookup(@Nullable ScopedLoggingContext.ScopeList list, ScopeType type)Finds a scope instance for the given type in a possibly null scope list.
-
-
-
Constructor Detail
-
ScopeList
public ScopeList(ScopeType key, LoggingScope scope, @Nullable ScopedLoggingContext.ScopeList next)
-
-
Method Detail
-
addScope
public static @Nullable ScopedLoggingContext.ScopeList addScope(@Nullable ScopedLoggingContext.ScopeList list, @Nullable ScopeType type)
Adds a new scope to the list for the given type. If the given type is null, or a scope for the type already exists in the list, the original (potentiallynull) list reference is returned.
-
lookup
public static @Nullable LoggingScope lookup(@Nullable ScopedLoggingContext.ScopeList list, ScopeType type)
Finds a scope instance for the given type in a possibly null scope list.
-
-