Class Spans

java.lang.Object
com.amazon.ion.util.Spans

public final class Spans extends Object
Utility methods for working with Spans.
  • Constructor Details

    • Spans

      public Spans()
  • Method Details

    • currentSpan

      public static Span currentSpan(Object spanProvider)
      Attempts to get a Span from the given object, if it supports SpanProvider.currentSpan().
      Parameters:
      spanProvider - may be null.
      Returns:
      null if there's not a current span.
    • currentSpan

      public static <T> T currentSpan(Class<T> spanFacetType, Object spanProvider)
      Attempts to get a Span facet from the given object, if it supports SpanProvider.currentSpan().
      Parameters:
      spanProvider - may be null.
      Returns:
      null if there's not a current span supporting spanFacetType.