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
@ProviderType public final class UnableToAdaptException extends RuntimeException
Exception is thrown ifAdaptTo.notNull(org.apache.sling.api.adapter.Adaptable, java.lang.Class<T>)call was not successful.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnableToAdaptException(@NotNull org.apache.sling.api.adapter.Adaptable adaptable, @NotNull Class<?> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull org.apache.sling.api.adapter.AdaptablegetAdaptable()@NotNull Class<?>getType()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
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 Detail
-
getAdaptable
@NotNull public @NotNull org.apache.sling.api.adapter.Adaptable getAdaptable()
- Returns:
- Adaptable object instance
-
getType
@NotNull public @NotNull Class<?> getType()
- Returns:
- Interface to adapt to
-
-