Top Description Constructors Methods
com.amazon.ion.impl

pack-priv abstract Class DowncastingFaceted

extends Object
implements Faceted
Class Inheritance
All Implemented Interfaces
com.amazon.ion.facet.Faceted
Known Direct Subclasses
com.amazon.ion.impl.IonReaderContinuableTopLevelBinary.IonReaderBinarySpan, com.amazon.ion.impl.IonReaderTextUserX.IonReaderTextSpan, com.amazon.ion.impl.IonReaderTreeUserX.TreeSpan
Imports
com.amazon.ion.facet.Faceted

Provides a simple implementation of Faceted that delegates facet interpolation as a cast.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public final <T> T
asFacet(final Class<T>
The type token of the requested facet type.
type
)

Implements com.amazon.ion.facet.Faceted.asFacet.

Returns a facet of this subject if supported.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DowncastingFacetedback to summary
pack-priv DowncastingFaceted()

Method Detail

asFacetback to summary
public final <T> T asFacet(final Class<T> type)

Implements com.amazon.ion.facet.Faceted.asFacet.

Doc from com.amazon.ion.facet.Faceted.asFacet.

Returns a facet of this subject if supported.

Parameters
<T>
The requested facet type.
type:Class<T>

The type token of the requested facet type.

Returns:T

An instance of T representing the facet of the subject, or null if the facet is not supported by the subject.