ScalaTest 1.0
|
|
org/scalatest/PrivateMethodTester.scala
]
final
class
Invoker(target : AnyRef)
extends
AnyRefMethod Summary | |
def
|
invokePrivate
[T](invocation : Invocation[T]) : T
Invoke a private method. This method will attempt to invoke via reflection a private method.
The name of the method to invoke is contained in the
methodName field of the passed Invocation .
The arguments to pass are contained in the args field. The object on which to invoke the private
method is the target object passed to this Invoker 's primary constructor.
The type parameter, T , is the return type of the private method. |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
def
invokePrivate[T](invocation : Invocation[T]) : T
methodName
field of the passed Invocation
.
The arguments to pass are contained in the args
field. The object on which to invoke the private
method is the target
object passed to this Invoker
's primary constructor.
The type parameter, T
, is the return type of the private method.invocation -
the Invocation
object containing the method name symbol and args of the invocation.IllegalArgumentException -
if the target object does not have a method of the name, with argument types compatible with the objects in the passed args array, specified in the passed Invocation
object.
ScalaTest 1.0
|
|