org.jsesoft.ri
Class ReflectionInspectionHelpers

java.lang.Object
  extended by org.jsesoft.ri.ReflectionInspectionHelpers

public class ReflectionInspectionHelpers
extends java.lang.Object

Provides helpers for reflection inspection.


Field Summary
static java.lang.String DESCRIPTION
           
static java.lang.String DESCRIPTOR_TYPE
           
static java.lang.String DISPLAY_NAME
           
static java.lang.String GET
           
static java.lang.String IS
           
static java.lang.String NAME
           
static java.lang.String SET
           
 
Constructor Summary
ReflectionInspectionHelpers()
           
 
Method Summary
static java.lang.reflect.Method getGetter(java.lang.Class<?> inspected, java.lang.reflect.Field field)
          Inquires the getter method for a field.
static java.beans.PropertyDescriptor getPropertyDescriptor(java.beans.PropertyDescriptor[] features, java.lang.reflect.Field field)
          Gets the BeanInfe PropertyDescriptor for the field.
static java.lang.reflect.Method getSetter(java.lang.Class<?> inspected, java.lang.reflect.Field field)
          Inquires the setter method for a field.
static boolean isGetter(java.lang.reflect.Method method)
          Checks whether or not a method is a getter.
static boolean isSetter(java.lang.reflect.Method method)
          Checks whether or not a method is a setter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

DISPLAY_NAME

public static final java.lang.String DISPLAY_NAME
See Also:
Constant Field Values

DESCRIPTION

public static final java.lang.String DESCRIPTION
See Also:
Constant Field Values

DESCRIPTOR_TYPE

public static final java.lang.String DESCRIPTOR_TYPE
See Also:
Constant Field Values

IS

public static final java.lang.String IS
See Also:
Constant Field Values

SET

public static final java.lang.String SET
See Also:
Constant Field Values

GET

public static final java.lang.String GET
See Also:
Constant Field Values
Constructor Detail

ReflectionInspectionHelpers

public ReflectionInspectionHelpers()
Method Detail

getPropertyDescriptor

public static java.beans.PropertyDescriptor getPropertyDescriptor(java.beans.PropertyDescriptor[] features,
                                                                  java.lang.reflect.Field field)
Gets the BeanInfe PropertyDescriptor for the field.

Parameters:
features - the BeanInfo PropertyDescriptors
field - the Field
Returns:
the PropertyDescriptor, null if none

isSetter

public static boolean isSetter(java.lang.reflect.Method method)
Checks whether or not a method is a setter.

Parameters:
method - the method to check
Returns:
true if setter

isGetter

public static boolean isGetter(java.lang.reflect.Method method)
Checks whether or not a method is a getter.

Parameters:
method - the method to check
Returns:
true if getter

getGetter

public static java.lang.reflect.Method getGetter(java.lang.Class<?> inspected,
                                                 java.lang.reflect.Field field)
Inquires the getter method for a field.

Parameters:
inspected - the inspected Class
field - the inspected Field
Returns:
getter, null if none defined

getSetter

public static java.lang.reflect.Method getSetter(java.lang.Class<?> inspected,
                                                 java.lang.reflect.Field field)
Inquires the setter method for a field.

Parameters:
inspected - the inspected Class
field - the inspected Field
Returns:
setter, null if none defined


Copyright © 2010 JSESoft. All Rights Reserved.