org.sodatest.api.java.reflection
Class ReflectiveSodaReportForJava

java.lang.Object
  extended by org.sodatest.api.java.JavaParameterConverter
      extended by org.sodatest.api.java.JavaReportConverter
          extended by org.sodatest.api.java.reflection.ReflectiveSodaReportForJava
All Implemented Interfaces:
org.sodatest.api.reflection.ReflectiveSodaReport, org.sodatest.api.SodaReport, scala.ScalaObject

public abstract class ReflectiveSodaReportForJava
extends JavaReportConverter
implements org.sodatest.api.reflection.ReflectiveSodaReport

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

 public class MySodaReport extends ReflectiveSodaReportForJava {
     public BigDecimal amount = null;

     public List<List<String>> getReport() {
         return ...; // Execute the Report on the System, making use of 'amount'
     }
 }
 


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sodatest.api.SodaReport
org.sodatest.api.SodaReport.$anonfun$toReport$1, org.sodatest.api.SodaReport.$anonfun$toSingleColumnReport$1, org.sodatest.api.SodaReport.$anonfun$toSingleRowReport$1, org.sodatest.api.SodaReport.ItemListWrapper, org.sodatest.api.SodaReport.ItemTableWrapper, org.sodatest.api.SodaReport.ItemWrapper
 
Constructor Summary
ReflectiveSodaReportForJava()
           
 
Method Summary
 scala.collection.Seq<scala.collection.Seq<String>> apply()
          Invokes the getReport() method and converts the result before returning it.
 scala.collection.Seq<scala.collection.Seq<String>> apply(scala.collection.immutable.Map<String,String> parameters)
          Coerces and binds the parameters to this Report, then delegates to the (@link #apply()} function.
protected abstract  List<List<String>> getReport()
          Executes this Report 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.JavaReportConverter
convertReport, toReport, toSingleCellReport, toSingleColumnReport, toSingleRowReport
 
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

ReflectiveSodaReportForJava

public ReflectiveSodaReportForJava()
Method Detail

getReport

protected abstract List<List<String>> getReport()
Executes this Report on the System under test using the parameters that have been coerced and bound by reflection into the members of this instance.

Returns:
a table representing the result of the Report as a List of Lists of string. There is no requirement for the Lists in the second dimension to have the same length as each other.

apply

public final scala.collection.Seq<scala.collection.Seq<String>> apply()
Invokes the getReport() method and converts the result before returning it. You can override JavaReportConverter.convertReport(java.util.List) if you want to use a different method of conversion.

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

apply

public final scala.collection.Seq<scala.collection.Seq<String>> apply(scala.collection.immutable.Map<String,String> parameters)
                                                               throws org.sodatest.coercion.CoercionBindingException
Coerces and binds the parameters to this Report, then delegates to the (@link #apply()} function.

Specified by:
apply in interface org.sodatest.api.reflection.ReflectiveSodaReport
Specified by:
apply in interface org.sodatest.api.SodaReport
Throws:
org.sodatest.coercion.CoercionBindingException


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