// 
// Decompiled by Procyon v0.6.0
// 

package com.google.common.flogger.context;

import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import com.google.common.flogger.LoggingScope;
import com.google.common.flogger.util.Checks;
import com.google.common.flogger.LoggingScopeProvider;

public final class ScopeType implements LoggingScopeProvider
{
    public static final ScopeType REQUEST;
    private final String name;
    
    public static ScopeType create(final String name) {
        return new ScopeType(name);
    }
    
    private ScopeType(final String name) {
        this.name = Checks.checkNotNull(name, "name");
    }
    
    LoggingScope newScope() {
        return LoggingScope.create(this.name);
    }
    
    @NullableDecl
    @Override
    public LoggingScope getCurrentScope() {
        return ContextDataProvider.getInstance().getScope(this);
    }
    
    static {
        REQUEST = create("request");
    }
}
