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 TypeMethodDescriptionReturns the wrapped value.static <T> TgetTargetObject(T object) Unwraps the given object if it is an instance ofWrapped.
-
Method Details
-
getTarget
-
getTargetObject
static <T> T getTargetObject(T object) Unwraps the given object if it is an instance ofWrapped. 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.
-