net.vidageek.mirror.reflect.dsl
Interface ReflectionHandler<T>

All Known Implementing Classes:
DefaultReflectionHandler

public interface ReflectionHandler<T>

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

Author:
donizetti

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()
           
 

Method Detail

field

Field field(String fieldName)
Use this method to reflect a field by its name.

Parameters:
fieldName - Name of the field to be reflected.
Returns:
A field identified by fieldName or null if none is found.
Throws:
IllegalArgumentException - if fieldName is null or empty
See Also:
DefaultFieldReflector.onClass(Class)

method

MethodReflector method(String methodName)
Use this method to choose the name of the method to reflect.

Parameters:
methodName - name of the method to be reflected
Returns:
An object responsible for reflecting the method.
Throws:
IllegalArgumentException - if methodName is null or empty
See Also:
DefaultMethodReflector

constructor

ConstructorReflector<T> constructor()
Use this method to reflect a constructor

Returns:
An object responsible for reflecting constructors.
See Also:
DefaultConstructorReflector

annotation

<A> AnnotationHandler<? extends A> annotation(Class<A> annotation)
Use this method to reflect annotations.

Parameters:
annotation - Type of the annotation to be reflected.
Returns:
An object responsible for reflecting annotations.
See Also:
AnnotationHandler

parentGenericType

ParameterizedElementHandler parentGenericType()


Copyright © 2011 VidaGeek.net. All Rights Reserved.