net.vidageek.mirror.provider
Interface ClassReflectionProvider<T>

All Known Implementing Classes:
PureJavaClassReflectionProvider

public interface ClassReflectionProvider<T>

Interface that defines reflection operations related to class

Author:
jonasabreu

Method Summary
 List<Constructor<T>> reflectAllConstructors()
          Method used to reflect all constructor on the wrapped class.
 List<Field> reflectAllFields()
          Method used to reflect all fields on the wrapped class.
 List<Method> reflectAllMethods()
          Method used to reflect all methods on the wrapped class.
 Class<T> reflectClass()
          Method used to gain access to the class wrapped.
 Constructor<T> reflectConstructor(Class<?>[] argumentTypes)
          Method used to reflect a single constructor matching argumentTypes.
 Field reflectField(String fieldName)
          This method is used to reflect a single field named fieldName
 Method reflectMethod(String methodName, Class<?>[] argumentTypes)
          This method is used to reflect a single method named methodName and with args argumentTypes
 

Method Detail

reflectClass

Class<T> reflectClass()
Method used to gain access to the class wrapped.

Returns:
The class wrapped by this ClassReflectionProvider
Throws:
ReflectionProviderException

reflectField

Field reflectField(String fieldName)
This method is used to reflect a single field named fieldName

Parameters:
fieldName - Name of the field to be reflected
Returns:
The field represented by fieldName or null if not found.
Throws:
ReflectionProviderException

reflectMethod

Method reflectMethod(String methodName,
                     Class<?>[] argumentTypes)
This method is used to reflect a single method named methodName and with args argumentTypes

Parameters:
methodName - name of the method to be reflected.
argumentTypes - argument types of the method to be reflected.
Returns:
The method that has methodName as its name and matches argumentTypes. Will return null if method is not found.
Throws:
ReflectionProviderException

reflectConstructor

Constructor<T> reflectConstructor(Class<?>[] argumentTypes)
Method used to reflect a single constructor matching argumentTypes.

Parameters:
argumentTypes - argument types of the constructor to be reflected.
Returns:
The constructor that matches argumentTypes or null if none is found
Throws:
ReflectionProviderException

reflectAllFields

List<Field> reflectAllFields()
Method used to reflect all fields on the wrapped class.

Returns:
A list containing all field found on the class and it's hierarchy.
Throws:
ReflectionProviderException

reflectAllMethods

List<Method> reflectAllMethods()
Method used to reflect all methods on the wrapped class.

Returns:
A list containing all methods found on the class and it's hierarchy.
Throws:
ReflectionProviderException

reflectAllConstructors

List<Constructor<T>> reflectAllConstructors()
Method used to reflect all constructor on the wrapped class.

Returns:
A list containing all field found on the class.
Throws:
ReflectionProviderException


Copyright © 2011 VidaGeek.net. All Rights Reserved.