net.vidageek.mirror.invoke.dsl
Interface ConstructorHandler<T>

All Known Implementing Classes:
ConstructorHandlerByArgs, ConstructorHandlerByConstructor

public interface ConstructorHandler<T>

Interface for classes responsible for invoking constructors.

Author:
jonasabreu

Method Summary
 T bypasser()
          Instantiates an object without using the constructor.
 T withArgs(Object... args)
          Invoke a constructor using args as its arguments.
 T withoutArgs()
          Invoke a constructor without arguments.
 

Method Detail

withoutArgs

T withoutArgs()
Invoke a constructor without arguments.

Returns:
An instance of object this constructor can create.

withArgs

T withArgs(Object... args)
Invoke a constructor using args as its arguments.

Parameters:
args - arguments to use when invoking this constructor.
Returns:
An instance of object this constructor can create.

bypasser

T bypasser()
Instantiates an object without using the constructor. This is only supported for Objenesis supported VM. Please check http://code.google.com/p/objenesis/wiki/ListOfCurrentlySupportedVMs to see if your VM is supported.

Returns:
An instance created without invoking any constructor.


Copyright © 2011 VidaGeek.net. All Rights Reserved.