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

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

public final class DefaultReflectionHandler<T>
extends Object
implements ReflectionHandler<T>

This part of the DSL is used to choose reflection element is going to be reflected.

Author:
jonasabreu

Constructor Summary
DefaultReflectionHandler(ReflectionProvider provider, Class<T> clazz)
           
 
Method Summary
<A> AnnotationHandler<? extends A>
annotation(Class<A> annotation)
          Use this method to reflect annotations.
 ConstructorReflector<T> constructor()
          Use this method to reflect a constructor
 Field field(String fieldName)
          Use this method to reflect a field by its name.
 MethodReflector method(String methodName)
          Use this method to choose the name of the method to reflect.
 ParameterizedElementHandler parentGenericType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultReflectionHandler

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

field

public Field field(String fieldName)
Description copied from interface: ReflectionHandler
Use this method to reflect a field by its name.

Specified by:
field in interface ReflectionHandler<T>
Parameters:
fieldName - Name of the field to be reflected.
Returns:
A field identified by fieldName or null if none is found.
See Also:
DefaultFieldReflector.onClass(Class)

method

public MethodReflector method(String methodName)
Description copied from interface: ReflectionHandler
Use this method to choose the name of the method to reflect.

Specified by:
method in interface ReflectionHandler<T>
Parameters:
methodName - name of the method to be reflected
Returns:
An object responsible for reflecting the method.
See Also:
DefaultMethodReflector

constructor

public ConstructorReflector<T> constructor()
Description copied from interface: ReflectionHandler
Use this method to reflect a constructor

Specified by:
constructor in interface ReflectionHandler<T>
Returns:
An object responsible for reflecting constructors.
See Also:
DefaultConstructorReflector

annotation

public <A> AnnotationHandler<? extends A> annotation(Class<A> annotation)
Description copied from interface: ReflectionHandler
Use this method to reflect annotations.

Specified by:
annotation in interface ReflectionHandler<T>
Parameters:
annotation - Type of the annotation to be reflected.
Returns:
An object responsible for reflecting annotations.
See Also:
AnnotationHandler

parentGenericType

public ParameterizedElementHandler parentGenericType()
Specified by:
parentGenericType in interface ReflectionHandler<T>


Copyright © 2011 VidaGeek.net. All Rights Reserved.