org.sodatest.api.java.reflection
Class ReflectiveSodaEventForJava

java.lang.Object
  extended by org.sodatest.api.java.JavaParameterConverter
      extended by org.sodatest.api.java.reflection.ReflectiveSodaEventForJava
All Implemented Interfaces:
org.sodatest.api.reflection.ReflectiveSodaEvent, org.sodatest.api.SodaEvent, scala.ScalaObject

public abstract class ReflectiveSodaEventForJava
extends JavaParameterConverter
implements org.sodatest.api.reflection.ReflectiveSodaEvent

A Java [[org.sodatest.api.SodaEvent]] base class that supports the automatic binding of parameters to public and strongly-typed fields or setter methods. The documentation of ReflectiveSodaEvent explains the details of coercion and binding that are applied to Reflective Events in both Scala and Java. Example

 public class MySodaEvent extends ReflectiveSodaEventForJava {
     public BigDecimal amount = null;

     public void executeEvent() {
         ... // Execute the Event on the System, making use of 'amount'
     }
 }
 


Constructor Summary
ReflectiveSodaEventForJava()
           
 
Method Summary
 void apply()
          Invokes the executeEvent() method.
 void apply(scala.collection.immutable.Map<String,String> parameters)
          Coerces and binds the parameters to this Event, then delegates to the apply() function.
protected abstract  void executeEvent()
          Executes this Event on the System under test using the parameters that have been coerced and bound by reflection into the members of this instance.
 
Methods inherited from class org.sodatest.api.java.JavaParameterConverter
convertParameters, list, None
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectiveSodaEventForJava

public ReflectiveSodaEventForJava()
Method Detail

executeEvent

protected abstract void executeEvent()
Executes this Event on the System under test using the parameters that have been coerced and bound by reflection into the members of this instance.


apply

public final void apply()
Invokes the executeEvent() method.

Specified by:
apply in interface org.sodatest.api.reflection.ReflectiveSodaEvent

apply

public final void apply(scala.collection.immutable.Map<String,String> parameters)
                 throws org.sodatest.coercion.CoercionBindingException
Coerces and binds the parameters to this Event, then delegates to the apply() function.

Specified by:
apply in interface org.sodatest.api.reflection.ReflectiveSodaEvent
Specified by:
apply in interface org.sodatest.api.SodaEvent
Throws:
org.sodatest.coercion.CoercionBindingException


Copyright © 2010-2011 Belmont Technology Pty Ltd. All Rights Reserved.