Interface Wrapped

All Known Subinterfaces:
LazyLoadingProxy

public interface Wrapped
Marker interface for objects that wrap another object, providing a way to retrieve the wrapped value.
Since:
5.0
Author:
Mark Paluch
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the wrapped value.
    static <T> T
    getTargetObject(T object)
    Unwraps the given object if it is an instance of Wrapped.
  • Method Details

    • getTarget

      Object getTarget()
      Returns the wrapped value.
      Returns:
    • getTargetObject

      static <T> T getTargetObject(T object)
      Unwraps the given object if it is an instance of Wrapped. If not, returns the object as-is.
      Parameters:
      object - the object to unwrap, must not be null.
      Returns:
      the unwrapped object or the original object if it is not wrapped.