org.springframework.richclient.command
Class CommandNotOfRequiredTypeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.richclient.application.ApplicationException
                  extended by org.springframework.richclient.command.CommandException
                      extended by org.springframework.richclient.command.CommandNotOfRequiredTypeException
All Implemented Interfaces:
Serializable

public class CommandNotOfRequiredTypeException
extends CommandException

Indicates that a command object was not of the expected type.

Since:
0.3
Author:
Kevin Stembridge
See Also:
Serialized Form

Constructor Summary
CommandNotOfRequiredTypeException(String commandId, Class requiredType, Class actualType)
          Creates a new CommandNotOfRequiredTypeException.
 
Method Summary
 Class getActualType()
          Returns the actual type of the command.
 String getCommandId()
          Returns the id of the command
 Class getRequiredType()
          Returns the type that the command was expected to be.
 
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

CommandNotOfRequiredTypeException

public CommandNotOfRequiredTypeException(String commandId,
                                         Class requiredType,
                                         Class actualType)
Creates a new CommandNotOfRequiredTypeException.

Parameters:
commandId - The id of the command.
requiredType - The required type of the command.
actualType - The actual type of the command.
Method Detail

getActualType

public Class getActualType()
Returns the actual type of the command.

Returns:
Returns the value of the actualType field, possibly null.

getCommandId

public String getCommandId()
Returns the id of the command

Returns:
Returns the value of the commandId field, possibly null.

getRequiredType

public Class getRequiredType()
Returns the type that the command was expected to be.

Returns:
Returns the value of the requiredType field, possibly null.


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.