Interface Coercable


public interface Coercable
  • Method Summary

    Modifier and Type
    Method
    Description
    coerceTo(Class<?> destinationClass)
    Attempt to convert this Coercable into the destinationClass.
  • Method Details

    • coerceTo

      Object coerceTo(Class<?> destinationClass) throws ClassCastException
      Attempt to convert this Coercable into the destinationClass. Throws ClassCastException if the desired class is not allowed.
      Parameters:
      destinationClass - Class desired...
      Returns:
      An Object cast to destinationClass.
      Throws:
      ClassCastException - thrown if this Coercable cannot be cast to the destinationClass.