Top Description Constructors Methods
com.amazon.ion.util

public final Class Spans

extends Object
Class Inheritance
Static Imports
com.amazon.ion.facet.Facets.asFacet

Utility methods for working with Spans.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Span

Returns:

null if there's not a current span.
currentSpan
(Object
may be null.
spanProvider
)

Attempts to get a Span from the given object, if it supports SpanProvider#currentSpan().

public static <T> T

Returns:

null if there's not a current span supporting spanFacetType.
currentSpan
(Class<T> spanFacetType, Object
may be null.
spanProvider
)

Attempts to get a Span facet from the given object, if it supports SpanProvider#currentSpan().

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Spansback to summary
public Spans()

Method Detail

currentSpanback to summary
public static Span currentSpan(Object spanProvider)

Attempts to get a Span from the given object, if it supports SpanProvider#currentSpan().

Parameters
spanProvider:Object

may be null.

Returns:Span

null if there's not a current span.

currentSpanback to summary
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:Object

may be null.

Returns:T

null if there's not a current span supporting spanFacetType.