JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.gui
Class InputWrapper

java.lang.Object
  |
  +--org.objectweb.jac.core.Wrapper
        |
        +--org.objectweb.jac.aspects.gui.InputWrapper
All Implemented Interfaces:
Serializable

public class InputWrapper
extends Wrapper

This wrapper asks the user the parameters of the invoked method if the attribute Gui.askForParameters is defined in the current collaboration.

See Also:
Display.showInput(Object,AbstractMethodItem,Object[]), InputSequence, Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac
 
Constructor Summary
InputWrapper(AspectComponent ac)
           
 
Method Summary
 Object askForParameters(Interaction interaction)
          Calls the Display.showInput method on the current display.
 void catchInputCanceled(InputCanceledException e)
           
 Object create(ClassItem classItem, Display display)
          This method performs all the inputs operations for an instance creation.
static Object newInstance(Class cl, Display display)
          Create a new instance of a class.
 
Methods inherited from class org.objectweb.jac.core.Wrapper
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, setAspectComponent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputWrapper

public InputWrapper(AspectComponent ac)
Method Detail

askForParameters

public Object askForParameters(Interaction interaction)
                        throws org.objectweb.jac.aspects.gui.InputFailedException,
                               InputCanceledException
Calls the Display.showInput method on the current display.

Returns:
the value returned by the wrapped method
org.objectweb.jac.aspects.gui.InputFailedException
InputCanceledException
See Also:
Display.showInput(Object,AbstractMethodItem,Object[])

create

public Object create(ClassItem classItem,
                     Display display)
              throws org.objectweb.jac.aspects.gui.InputFailedException,
                     InputCanceledException
This method performs all the inputs operations for an instance creation.

Parameters:
classItem - the class to instantiate
display - the display to use
org.objectweb.jac.aspects.gui.InputFailedException
InputCanceledException

newInstance

public static Object newInstance(Class cl,
                                 Display display)
                          throws InstantiationException,
                                 IllegalAccessException
Create a new instance of a class. If the class has known subclasses, the user will be given the choice of the actual class to instantiate.

Parameters:
cl - the class to instantiate
display - display to use for user interaction
Returns:
a new instance of the class
InstantiationException
IllegalAccessException

catchInputCanceled

public void catchInputCanceled(InputCanceledException e)

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli