net.vidageek.mirror.reflect
Class DefaultConstructorReflector<T>

java.lang.Object
  extended by net.vidageek.mirror.reflect.DefaultConstructorReflector<T>
All Implemented Interfaces:
ConstructorReflector<T>

public final class DefaultConstructorReflector<T>
extends Object
implements ConstructorReflector<T>

This class is responsible for reflecting a constructor.

Author:
jonasabreu

Constructor Summary
DefaultConstructorReflector(ReflectionProvider provider, Class<T> clazz)
           
 
Method Summary
 Constructor<T> withAnyArgs()
          Use this method to reflect the only constructor on the class
 Constructor<T> withArgs(Class<?>... classes)
          Use this method to reflect a constructor using its argument list.
 Constructor<T> withoutArgs()
          This is a convenience method for ConstructorReflector.withArgs(Class...)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConstructorReflector

public DefaultConstructorReflector(ReflectionProvider provider,
                                   Class<T> clazz)
Method Detail

withArgs

public Constructor<T> withArgs(Class<?>... classes)
Description copied from interface: ConstructorReflector
Use this method to reflect a constructor using its argument list.

Specified by:
withArgs in interface ConstructorReflector<T>
Parameters:
classes - argument types of the constructor to be reflected.
Returns:
A constructor matching args or null if none is found.
See Also:
ClassReflectionProvider.reflectConstructor(Class[])

withoutArgs

public Constructor<T> withoutArgs()
Description copied from interface: ConstructorReflector
This is a convenience method for ConstructorReflector.withArgs(Class...)

Specified by:
withoutArgs in interface ConstructorReflector<T>

withAnyArgs

public Constructor<T> withAnyArgs()
Description copied from interface: ConstructorReflector
Use this method to reflect the only constructor on the class

Specified by:
withAnyArgs in interface ConstructorReflector<T>
Returns:
The only constructor of the class


Copyright © 2011 VidaGeek.net. All Rights Reserved.