net.vidageek.mirror.provider.java
Class PureJavaConstructorReflectionProvider<T>

java.lang.Object
  extended by net.vidageek.mirror.provider.java.PureJavaConstructorReflectionProvider<T>
All Implemented Interfaces:
ConstructorReflectionProvider<T>, ReflectionElementReflectionProvider

public final class PureJavaConstructorReflectionProvider<T>
extends Object
implements ConstructorReflectionProvider<T>

Author:
jonasabreu

Constructor Summary
PureJavaConstructorReflectionProvider(Class<T> clazz, Constructor<T> constructor)
           
 
Method Summary
 Class<?>[] getParameters()
          This method is used to reflect the wrapped constructor parameter array.
 T instantiate(Object... args)
          this method is used to instantiate an Object using wrapped constructor.
 void setAccessible()
          set wrapped object as accessible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PureJavaConstructorReflectionProvider

public PureJavaConstructorReflectionProvider(Class<T> clazz,
                                             Constructor<T> constructor)
Method Detail

setAccessible

public void setAccessible()
Description copied from interface: ReflectionElementReflectionProvider
set wrapped object as accessible.

Specified by:
setAccessible in interface ReflectionElementReflectionProvider

instantiate

public T instantiate(Object... args)
Description copied from interface: ConstructorReflectionProvider
this method is used to instantiate an Object using wrapped constructor.

Specified by:
instantiate in interface ConstructorReflectionProvider<T>
Parameters:
args - Arguments used to instantiate object.
Returns:
An instance provided by wrapped constructor.

getParameters

public Class<?>[] getParameters()
Description copied from interface: ConstructorReflectionProvider
This method is used to reflect the wrapped constructor parameter array.

Specified by:
getParameters in interface ConstructorReflectionProvider<T>
Returns:
An array of class objects representing the method parameters.


Copyright © 2011 VidaGeek.net. All Rights Reserved.