classUtils.reflection
Class MethodList

java.lang.Object
  extended by classUtils.reflection.MethodList

public class MethodList
extends java.lang.Object

methodList is a container and processor of methods.


Constructor Summary
MethodList()
           
MethodList(java.lang.Class c)
           
 
Method Summary
 void add(java.lang.reflect.Method m)
           
 void add(java.lang.reflect.Method[] m)
           
 boolean containedBy(java.lang.reflect.Method m)
           
 java.lang.reflect.Method elementAt(int i)
           
static boolean equals(java.lang.reflect.Method m1, java.lang.reflect.Method m2)
          determine if two methods are equal.
 java.lang.reflect.Method[] filter(java.lang.reflect.Method[] m)
          Return all the methods in the array that are not contained in the method list.
 java.lang.reflect.Method[] getAllPublicMethods()
           
 java.lang.reflect.Method[] getAllPublicStaticMethods()
           
 java.lang.reflect.Method[] getMainMethods()
          Get a list of all methods that might be considered a main method
 java.lang.reflect.Method[] getMethods()
          return the internally held data as an array of methods;
static java.lang.reflect.Method[] getMethodsWithNArgs(java.lang.reflect.Method[] m, int n)
           
static java.lang.reflect.Method[] getPrimMethods(MethodList ml)
           
static java.lang.String getPropertyName(java.lang.reflect.Method m)
           
 java.lang.String[] getPropertyNames()
           
static java.lang.reflect.Method[] getPublicMethods(java.lang.reflect.Method[] m)
           
 java.lang.reflect.Method[] getPublicReadMethods()
           
 java.lang.reflect.Method getReadMethod(java.lang.reflect.Method setter)
           
 java.lang.reflect.Method[] getReadMethods()
           
 java.lang.reflect.Method[] getReadWriteMethods()
           
 java.lang.Class[] getReturnTypes()
           
 java.lang.reflect.Method[] getWriteMethods()
           
 boolean hasMainMethod()
           
static boolean hasPasswordProperty(java.lang.reflect.Method m)
           
static boolean hasPublicTransientProperty(java.lang.Class c, java.lang.reflect.Method m)
           
 boolean hasReadMethod(java.lang.reflect.Method m)
          return true if input method has a corresponding read method.
 int index(java.lang.reflect.Method m1)
           
static boolean isAcceptableParamList(java.lang.reflect.Method m)
           
static void main(java.lang.String[] args)
           
 int size()
          get number of methods in list
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodList

public MethodList(java.lang.Class c)

MethodList

public MethodList()
Method Detail

hasMainMethod

public boolean hasMainMethod()

getMainMethods

public java.lang.reflect.Method[] getMainMethods()
Get a list of all methods that might be considered a main method

Returns:
method list

main

public static void main(java.lang.String[] args)

getReadMethod

public java.lang.reflect.Method getReadMethod(java.lang.reflect.Method setter)
Parameters:
setter - - given the setter
Returns:
the getter.

getPrimMethods

public static java.lang.reflect.Method[] getPrimMethods(MethodList ml)

index

public int index(java.lang.reflect.Method m1)

isAcceptableParamList

public static boolean isAcceptableParamList(java.lang.reflect.Method m)

getMethodsWithNArgs

public static java.lang.reflect.Method[] getMethodsWithNArgs(java.lang.reflect.Method[] m,
                                                             int n)

getPropertyNames

public java.lang.String[] getPropertyNames()

getPropertyName

public static java.lang.String getPropertyName(java.lang.reflect.Method m)

hasReadMethod

public boolean hasReadMethod(java.lang.reflect.Method m)
return true if input method has a corresponding read method.

Parameters:
m - The input method
Returns:
true if read method present.

getReadWriteMethods

public java.lang.reflect.Method[] getReadWriteMethods()

getWriteMethods

public java.lang.reflect.Method[] getWriteMethods()

getAllPublicStaticMethods

public java.lang.reflect.Method[] getAllPublicStaticMethods()

getAllPublicMethods

public java.lang.reflect.Method[] getAllPublicMethods()

getPublicReadMethods

public java.lang.reflect.Method[] getPublicReadMethods()

getPublicMethods

public static java.lang.reflect.Method[] getPublicMethods(java.lang.reflect.Method[] m)

getReadMethods

public java.lang.reflect.Method[] getReadMethods()

containedBy

public boolean containedBy(java.lang.reflect.Method m)

getReturnTypes

public java.lang.Class[] getReturnTypes()

getMethods

public java.lang.reflect.Method[] getMethods()
return the internally held data as an array of methods;


filter

public java.lang.reflect.Method[] filter(java.lang.reflect.Method[] m)
Return all the methods in the array that are not contained in the method list.


size

public int size()
get number of methods in list


elementAt

public java.lang.reflect.Method elementAt(int i)

add

public void add(java.lang.reflect.Method m)

add

public void add(java.lang.reflect.Method[] m)

equals

public static boolean equals(java.lang.reflect.Method m1,
                             java.lang.reflect.Method m2)
determine if two methods are equal. If they are non-null, have the same names and parameter lists, then they are equal.


hasPublicTransientProperty

public static boolean hasPublicTransientProperty(java.lang.Class c,
                                                 java.lang.reflect.Method m)

hasPasswordProperty

public static boolean hasPasswordProperty(java.lang.reflect.Method m)