corelib.runtime.reflexion
Class ClassUtility

java.lang.Object
  extended by corelib.runtime.reflexion.ClassUtility

public class ClassUtility
extends java.lang.Object

Adds capabilities to the standard reflexion engine.

Since:
0.1.0
Author:
Dominique Liard

Constructor Summary
ClassUtility()
           
 
Method Summary
static java.lang.reflect.Field getField(java.lang.Class<?> initialMetaClass, java.lang.String attributeName)
          Search an attribute in the specified class or in its parent class.
static java.lang.reflect.Method getMethod(java.lang.Class<?> initialMetaClass, java.lang.String methodName, java.lang.Class<?>[] parameterTypes)
          Search a method in the specified class or in its parent class.
static java.util.List<Property> getProperties(java.lang.Class<?> typeDescriptor)
          Find all existing public properties for the specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassUtility

public ClassUtility()
Method Detail

getField

public static java.lang.reflect.Field getField(java.lang.Class<?> initialMetaClass,
                                               java.lang.String attributeName)
                                        throws java.lang.NoSuchFieldException
Search an attribute in the specified class or in its parent class.

Parameters:
initialMetaClass - The type descriptor of the base class to use for the search.
attributeName - The name of the attribute to find.
Returns:
Metadata fot the seached attribute.
Throws:
java.lang.NoSuchFieldException - Thrown if the attribute does not exists.

getMethod

public static java.lang.reflect.Method getMethod(java.lang.Class<?> initialMetaClass,
                                                 java.lang.String methodName,
                                                 java.lang.Class<?>[] parameterTypes)
                                          throws java.lang.NoSuchMethodException
Search a method in the specified class or in its parent class.

Parameters:
initialMetaClass - The type descriptor of the base class to use for the search.
methodName - The name of the method to find.
parameterTypes - The type descriptors of the method parameters.
Returns:
Metadata fot the seached method.
Throws:
java.lang.NoSuchMethodException - Thrown if the method does not exists.

getProperties

public static java.util.List<Property> getProperties(java.lang.Class<?> typeDescriptor)
Find all existing public properties for the specified type.

Parameters:
typeDescriptor - The type to use for property search.
Returns:
A list of Property instance.
Since:
0.4.1


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.