net.vidageek.mirror.provider.java
Class PureJavaClassReflectionProvider<T>

java.lang.Object
  extended by net.vidageek.mirror.provider.java.PureJavaClassReflectionProvider<T>
All Implemented Interfaces:
ClassReflectionProvider<T>

public final class PureJavaClassReflectionProvider<T>
extends Object
implements ClassReflectionProvider<T>


Constructor Summary
PureJavaClassReflectionProvider(Class<T> clazz)
           
PureJavaClassReflectionProvider(String className)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PureJavaClassReflectionProvider

public PureJavaClassReflectionProvider(String className)

PureJavaClassReflectionProvider

public PureJavaClassReflectionProvider(Class<T> clazz)
Method Detail

reflectClass

public Class<T> reflectClass()
Description copied from interface: ClassReflectionProvider
Method used to gain access to the class wrapped.

Specified by:
reflectClass in interface ClassReflectionProvider<T>
Returns:
The class wrapped by this ClassReflectionProvider

reflectAllFields

public List<Field> reflectAllFields()
Description copied from interface: ClassReflectionProvider
Method used to reflect all fields on the wrapped class.

Specified by:
reflectAllFields in interface ClassReflectionProvider<T>
Returns:
A list containing all field found on the class and it's hierarchy.

reflectAllMethods

public List<Method> reflectAllMethods()
Description copied from interface: ClassReflectionProvider
Method used to reflect all methods on the wrapped class.

Specified by:
reflectAllMethods in interface ClassReflectionProvider<T>
Returns:
A list containing all methods found on the class and it's hierarchy.

reflectAllConstructors

public List<Constructor<T>> reflectAllConstructors()
Description copied from interface: ClassReflectionProvider
Method used to reflect all constructor on the wrapped class.

Specified by:
reflectAllConstructors in interface ClassReflectionProvider<T>
Returns:
A list containing all field found on the class.

reflectConstructor

public Constructor<T> reflectConstructor(Class<?>[] argumentTypes)
Description copied from interface: ClassReflectionProvider
Method used to reflect a single constructor matching argumentTypes.

Specified by:
reflectConstructor in interface ClassReflectionProvider<T>
Parameters:
argumentTypes - argument types of the constructor to be reflected.
Returns:
The constructor that matches argumentTypes or null if none is found

reflectField

public Field reflectField(String fieldName)
Description copied from interface: ClassReflectionProvider
This method is used to reflect a single field named fieldName

Specified by:
reflectField in interface ClassReflectionProvider<T>
Parameters:
fieldName - Name of the field to be reflected
Returns:
The field represented by fieldName or null if not found.

reflectMethod

public Method reflectMethod(String methodName,
                            Class<?>[] argumentTypes)
Description copied from interface: ClassReflectionProvider
This method is used to reflect a single method named methodName and with args argumentTypes

Specified by:
reflectMethod in interface ClassReflectionProvider<T>
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.


Copyright © 2011 VidaGeek.net. All Rights Reserved.