net.sf.testextensions
Interface AccessObject


public interface AccessObject

The interface AccessObject declares the methods to access non public fields and methods. The implementation of the AccessObject should enclose all the nessecary things.

Author:
forge-cl

Method Summary
 AccessField getField(String fieldName)
          The methode getField select a field for manipulation.
 AccessMethod getMethod(String methodName)
          The method getMethod provide access to a by name called method.
 AccessObject newInnerInstance(String innerClassname)
          The method newInnerInstance create a instance of an inner class from the current object.
 AccessObject newInnerInstance(String innerClassname, Object[] args)
          The method newInnerInstance create a instance of an inner class from the current object.
 

Method Detail

getField

AccessField getField(String fieldName)
                     throws TestExtensionException
The methode getField select a field for manipulation.

Parameters:
fieldName - the name of the wished field.
Returns:
an instance of AccessField
Throws:
TestExtensionException - the exception shows an error, when preparing the access to the field.

getMethod

AccessMethod getMethod(String methodName)
                       throws TestExtensionException
The method getMethod provide access to a by name called method. If there exists several methods with the same name, all methods were accessed by this method.

Parameters:
methodName - the name of the method.
Returns:
an object, which provide access to the method.
Throws:
TestExtensionException - the exception shows an error, when preparing the access to the method, for instance when no method was found.

newInnerInstance

AccessObject newInnerInstance(String innerClassname)
                              throws TestExtensionException
The method newInnerInstance create a instance of an inner class from the current object.

Parameters:
innerClassname - The name of the inner class without the prefix for the outer class.
Returns:
a new instance of an inner class of the current object.
Throws:
TestExtensionException - shows any error.

newInnerInstance

AccessObject newInnerInstance(String innerClassname,
                              Object[] args)
                              throws TestExtensionException
The method newInnerInstance create a instance of an inner class from the current object.

Parameters:
innerClassname - The name of the inner class without the prefix for the outer class.
args - the arguments for the constructor.
Returns:
a new instance of an inner class of the current object.
Throws:
TestExtensionException - shows any error.


Copyright © 2007. All Rights Reserved.