Interface Wrapper

All Known Subinterfaces:
Bucket, Clock, Counter, Counter.Builder, DistributionStatisticsConfig, DistributionStatisticsConfig.Builder, DistributionSummary, DistributionSummary.Builder, FunctionalCounter, FunctionalCounter.Builder<T>, Gauge<N>, Gauge.Builder<N>, HistogramSnapshot, Meter, Meter.Builder<B,M>, MeterRegistry, Tag, Timer, Timer.Builder, ValueAtPercentile

public interface Wrapper
Behavior of a type that wraps a related type, typically through delegation.
  • Method Summary

    Modifier and Type
    Method
    Description
    <R> R
    unwrap(Class<? extends R> c)
    Unwraps the delegate as the specified type.
  • Method Details

    • unwrap

      <R> R unwrap(Class<? extends R> c)
      Unwraps the delegate as the specified type.
      Type Parameters:
      R - type to cast to
      Parameters:
      c - Class to which to cast the delegate
      Returns:
      the delegate cast as the requested type
      Throws:
      ClassCastException - if the delegate is not compatible with the requested type