org.melati.poem.dbms.test.sql
Class Thrower

Package class diagram package Thrower
java.lang.Object
  extended by org.melati.poem.dbms.test.sql.Thrower
Direct Known Subclasses:
ThrowingArrayJdbc3, ThrowingBlobJdbc3, ThrowingCallableStatementJdbc3, ThrowingClobJdbc3, ThrowingConnectionJdbc3, ThrowingDatabaseMetaDataJdbc3, ThrowingDriverJdbc3, ThrowingNClob, ThrowingParameterMetaDataJdbc3, ThrowingPreparedStatementJdbc3, ThrowingRefJdbc3, ThrowingResultSetJdbc3, ThrowingResultSetMetaDataJdbc3, ThrowingRowId, ThrowingSavepoint, ThrowingSQLXML, ThrowingStatementJdbc3, ThrowingStruct

public abstract class Thrower
extends Object

A class which can throw on demand.

Since:
10 Feb 2007
Author:
timp

Constructor Summary
protected Thrower()
           
 
Method Summary
static boolean shouldThrow(Class<?> i, String methodName)
          Check whether method should throw, called once for every method invocation.
static void startThrowing(Class<?> i, String methodName)
          Tell named method to start throwing exceptions.
static void startThrowingAfter(Class<?> i, String methodName, int goes)
          Tell named method to start throwing exceptions.
static void stopThrowing(Class<?> i, String methodName)
          Tell named method to stop throwing exceptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Thrower

protected Thrower()
Method Detail

startThrowing

public static void startThrowing(Class<?> i,
                                 String methodName)
Tell named method to start throwing exceptions.

Parameters:
i - Interface class object
methodName - name in class.methodName format

startThrowingAfter

public static void startThrowingAfter(Class<?> i,
                                      String methodName,
                                      int goes)
Tell named method to start throwing exceptions.

Parameters:
i - Interface class object
methodName - name in class.methodName format

stopThrowing

public static void stopThrowing(Class<?> i,
                                String methodName)
Tell named method to stop throwing exceptions.

Parameters:
i - Interface class object
methodName - name in class.methodName format

shouldThrow

public static boolean shouldThrow(Class<?> i,
                                  String methodName)
Check whether method should throw, called once for every method invocation.

Parameters:
i - Interface class object
methodName - name in class.methodName format
Returns:
whether method named should throw exception


Copyright © 2000-2010 PanEris. All Rights Reserved.