net.vidageek.mirror.invoke
Class ConstructorHandlerByArgs<T>

java.lang.Object
  extended by net.vidageek.mirror.invoke.ConstructorHandlerByArgs<T>
All Implemented Interfaces:
ConstructorHandler<T>

public final class ConstructorHandlerByArgs<T>
extends java.lang.Object
implements ConstructorHandler<T>

This class is responsible for invoking a constructor using only the arguments supplied.

Author:
jonasabreu

Constructor Summary
ConstructorHandlerByArgs(ReflectionProvider provider, java.lang.Class<T> clazz)
           
 
Method Summary
 T withArgs(java.lang.Object... args)
          Invoke a constructor using args as its arguments.
 T withoutArgs()
          Invoke a constructor without arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstructorHandlerByArgs

public ConstructorHandlerByArgs(ReflectionProvider provider,
                                java.lang.Class<T> clazz)
Method Detail

withoutArgs

public T withoutArgs()
Description copied from interface: ConstructorHandler
Invoke a constructor without arguments.

Specified by:
withoutArgs in interface ConstructorHandler<T>
Returns:
An instance of object this constructor can create.

withArgs

public T withArgs(java.lang.Object... args)
Description copied from interface: ConstructorHandler
Invoke a constructor using args as its arguments.

Specified by:
withArgs in interface ConstructorHandler<T>
Parameters:
args - arguments to use when invoking this constructor.
Returns:
An instance of object this constructor can create.


Copyright © 2009 VidaGeek.net. All Rights Reserved.