Package io.wcm.sling.commons.adapter
Class UnableToAdaptException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.wcm.sling.commons.adapter.UnableToAdaptException
- All Implemented Interfaces:
Serializable
Exception is thrown if
AdaptTo.notNull(org.apache.sling.api.adapter.Adaptable, java.lang.Class<T>) call was not successful.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUnableToAdaptException(@NotNull org.apache.sling.api.adapter.Adaptable adaptable, @NotNull Class<?> type) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnableToAdaptException
public UnableToAdaptException(@NotNull @NotNull org.apache.sling.api.adapter.Adaptable adaptable, @NotNull @NotNull Class<?> type) - Parameters:
adaptable- Adaptable object instancetype- Interface to adapt to
-
-
Method Details
-
getAdaptable
@NotNull public @NotNull org.apache.sling.api.adapter.Adaptable getAdaptable()- Returns:
- Adaptable object instance
-
getType
- Returns:
- Interface to adapt to
-