de.smartics.util.adapt
Class AdaptableException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by de.smartics.util.adapt.AdaptableException
All Implemented Interfaces:
Serializable

public final class AdaptableException
     
     
extends RuntimeException

Signals that an implementation is not adaptable to the desired type.

See Also:
Serialized Form

Constructor Summary
AdaptableException(Class<?> instanceType, Class<?> adapterType)
          Convenience constructor without a root cause.
AdaptableException(Throwable cause, Class<?> instanceType, Class<?> adapterType)
          Default constructor.
 
Method Summary
 Class<?> getAdapterType()
          Returns the type of the requested adapter the instance cannot provided.
 Class<?> getInstanceType()
          Returns the type of the instance that does not provide the requested adapter.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdaptableException

public AdaptableException(Class<?> instanceType,
                          Class<?> adapterType)
Convenience constructor without a root cause.

Parameters:
instanceType - the type of the instance that does not provide the requested adapter.
adapterType - the type of the requested adapter the instance cannot provided.

AdaptableException

public AdaptableException(Throwable cause,
                          Class<?> instanceType,
                          Class<?> adapterType)
Default constructor.

Parameters:
cause - the root cause to this exception.
instanceType - the type of the instance that does not provide the requested adapter.
adapterType - the type of the requested adapter the instance cannot provided.
Method Detail

getInstanceType

public Class<?> getInstanceType()
Returns the type of the instance that does not provide the requested adapter.

Returns:
the type of the instance that does not provide the requested adapter. May be null.

getAdapterType

public Class<?> getAdapterType()
Returns the type of the requested adapter the instance cannot provided.

Returns:
the type of the requested adapter the instance cannot provided. May be null.


Copyright © 2011–2013 smartics. All rights reserved.