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

Method Detail

reflectClass

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

Returns:
The class wrapped by this ClassReflectionProvider
Throws:
ReflectionProviderException

reflectField

java.lang.reflect.Field reflectField(java.lang.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

java.lang.reflect.Method reflectMethod(java.lang.String methodName,
                                       java.lang.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

java.lang.reflect.Constructor<T> reflectConstructor(java.lang.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

java.util.List<java.lang.reflect.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

java.util.List<java.lang.reflect.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

java.util.List<java.lang.reflect.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 © 2009 VidaGeek.net. All Rights Reserved.