Class NoopScope

  • All Implemented Interfaces:
    NonThrowingCloseable, Scope, java.io.Closeable, java.lang.AutoCloseable

    public final class NoopScope
    extends java.lang.Object
    implements Scope
    A Scope that does nothing when it is created or closed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static Scope INSTANCE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private NoopScope()  
    • Field Detail

      • INSTANCE

        private static final Scope INSTANCE
    • Constructor Detail

      • NoopScope

        private NoopScope()
    • Method Detail

      • getInstance

        public static Scope getInstance()
        Returns a NoopScope.
        Returns:
        a NoopScope.
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface NonThrowingCloseable
        Specified by:
        close in interface Scope