org.scopemvc.core
Class ModelAction

java.lang.Object
  |
  +--org.scopemvc.core.ModelAction

public final class ModelAction
extends java.lang.Object

Actions on model objects can be invoked via ActionManager's API, taking a ModelAction to describe the method to invoke. A ModelAction contains a method name and a Class[] to describe the parameters in the method signature.

ModelActions are probably not used by application builders who will more likely call a model object's methods directly.

Version:
$Revision: 1.6 $ $Date: 2002/09/11 14:35:07 $
Author:
Steve Meyfroidt
See Also:
ActionManager.doAction(java.lang.Object, org.scopemvc.core.ModelAction, java.lang.Object[]), ActionManager.canDoAction(java.lang.Object, org.scopemvc.core.ModelAction)

Constructor Summary
ModelAction(java.lang.reflect.Method inMethod)
          Constructor for the ModelAction object
ModelAction(java.lang.String inMethodName)
          Constructor for the ModelAction object
ModelAction(java.lang.String inMethodName, java.lang.Class inParameterClass)
          Constructor for the ModelAction object
ModelAction(java.lang.String inMethodName, java.lang.Class[] inParameterClasses)
          Constructor for the ModelAction object
 
Method Summary
 java.lang.String getMethodName()
          Gets the method name
 java.lang.Class[] getParameterClasses()
          Gets the array of Class objects that represent the formal parameter types, in declaration order, of the method.
 java.lang.String toString()
          Returns a string representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelAction

public ModelAction(java.lang.String inMethodName)
Constructor for the ModelAction object

Parameters:
inMethodName - The name of the method on the model

ModelAction

public ModelAction(java.lang.reflect.Method inMethod)
Constructor for the ModelAction object

Parameters:
inMethod - The method on the model

ModelAction

public ModelAction(java.lang.String inMethodName,
                   java.lang.Class inParameterClass)
Constructor for the ModelAction object

Parameters:
inMethodName - The name of the method on the model
inParameterClass - The class of the unique method parameter

ModelAction

public ModelAction(java.lang.String inMethodName,
                   java.lang.Class[] inParameterClasses)
Constructor for the ModelAction object

Parameters:
inMethodName - The name of the method on the model
inParameterClasses - The set of classes for the parameters of the method
Method Detail

getMethodName

public java.lang.String getMethodName()
Gets the method name

Returns:
The methodName value

getParameterClasses

public java.lang.Class[] getParameterClasses()
Gets the array of Class objects that represent the formal parameter types, in declaration order, of the method.

Returns:
The parameter classes to describe the method signature. Never null: if no parameters returns an empty array.

toString

public java.lang.String toString()
Returns a string representation of this object

Overrides:
toString in class java.lang.Object
Returns:
a string representation


Copyright © 2000-2002 The Scope Team. All Rights Reserved.