org.objectweb.fractal.task.core.composition
Class InvalidParameterTypeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.objectweb.fractal.task.core.composition.FunctionExecutionException
              extended by org.objectweb.fractal.task.core.composition.InvalidParameterTypeException
All Implemented Interfaces:
java.io.Serializable

public class InvalidParameterTypeException
extends FunctionExecutionException

Exception thrown when a Function is called with a parameter of an invalid type.

See Also:
Serialized Form

Constructor Summary
InvalidParameterTypeException(Function function, int paramIndex, java.lang.Class<?> expectedType, java.lang.Class<?> actualType)
          Creates a new InvalidParameterTypeException.
InvalidParameterTypeException(Function function, int paramIndex, java.lang.Class<?> expectedType, java.lang.Class<?> actualType, java.lang.String message)
          Creates a new InvalidParameterTypeException.
 
Method Summary
 java.lang.Class<?> getActualType()
           
 java.lang.Class<?> getExpectedType()
           
 java.lang.String getMessage()
           
 int getParamIndex()
           
 
Methods inherited from class org.objectweb.fractal.task.core.composition.FunctionExecutionException
getFunction, getFunctionName, setFunctionName
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

InvalidParameterTypeException

public InvalidParameterTypeException(Function function,
                                     int paramIndex,
                                     java.lang.Class<?> expectedType,
                                     java.lang.Class<?> actualType)
Creates a new InvalidParameterTypeException.

Parameters:
function - the function object that has been invoked with an invalid parameter.
paramIndex - the index of the invalid parameter.
expectedType - the type that was expected for the parameter.
actualType - the actual type of the parameter.

InvalidParameterTypeException

public InvalidParameterTypeException(Function function,
                                     int paramIndex,
                                     java.lang.Class<?> expectedType,
                                     java.lang.Class<?> actualType,
                                     java.lang.String message)
Creates a new InvalidParameterTypeException.

Parameters:
function - the function object that has been invoked with an invalid parameter.
paramIndex - the index of the invalid parameter.
expectedType - the type that was expected for the parameter.
actualType - the actual type of the parameter.
message - an additional message.
Method Detail

getParamIndex

public int getParamIndex()
Returns:
the index of the invalid parameter.

getExpectedType

public java.lang.Class<?> getExpectedType()
Returns:
the type that was expected for the parameter.

getActualType

public java.lang.Class<?> getActualType()
Returns:
the actual type of the parameter.

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable


Copyright © 2007-2009 ObjectWeb Consortium. All Rights Reserved.