Interface Unwrappable


public interface Unwrappable
Generic interface to access associated (context information / aspects / APIs / whatever to call it) of objects. The default implementation of unwrap will try to cast object the method is called on as the requested class.
Author:
raven
  • Method Summary

    Modifier and Type
    Method
    Description
    default <X> Optional<X>
    unwrap(Class<X> clazz, boolean reflexive)
     
    static <X> Optional<X>
    unwrap(Object o, Class<X> clazz, boolean reflexive)
     
  • Method Details

    • unwrap

      default <X> Optional<X> unwrap(Class<X> clazz, boolean reflexive)
    • unwrap

      static <X> Optional<X> unwrap(Object o, Class<X> clazz, boolean reflexive)