Package org.brijframework.util.reflect
Class MethodUtil
- java.lang.Object
-
- org.brijframework.util.reflect.MethodUtil
-
public abstract class MethodUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description MethodUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Method>fillMethods(Method[] methods, ReflectionAccess _accessLevel, Class<?>... _classes)static MethodfindMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel, Class<?>... paramClasses)static Collection<Method>getAllMethod(Class<?> _class)Get all public methods current classstatic Collection<Method>getAllMethod(Class<?> _class, Class<?>... _params)Get all public methods current classstatic Collection<Method>getAllMethod(Class<?> _class, ReflectionAccess _accessLevel)Get methods of current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,defaultstatic List<Method>getAllOverloadMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel)Get all overloaded method of current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,defaultstatic List<Method>getAllOverrideMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel, Object... _param)Get all overloaded method of current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,defaultstatic StringgetFieldName(Method _method)static MethodgetMethod(Class<?> _class, String _method, int params, ReflectionAccess _accessLevel)static MethodgetMethod(Class<?> _class, String _method, Class<?>... _classes)Get public method of current classstatic MethodgetMethod(Class<?> _class, String _method, Object... _param)Get method current classstatic MethodgetMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel, Class<?>... _classes)Get field current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,defaultstatic MethodgetMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel, Object... _param)Get field current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,defaultstatic BooleanhasGetter(Class<?> _class)static BooleanhasSetter(Class<?> _class)static booleanisGetter(Method _method)static BooleanisMethodExists(Object _object, String _methodName)static booleanisSetter(Method _method)static booleanmatchInterface(Class<?> cls, Class<?> cld)static booleanmatchSuperClass(Class<?> cls, Class<?> cld)
-
-
-
Method Detail
-
fillMethods
public static List<Method> fillMethods(Method[] methods, ReflectionAccess _accessLevel, Class<?>... _classes)
-
getMethod
public static Method getMethod(Class<?> _class, String _method, Class<?>... _classes)
Get public method of current class- Parameters:
_class- ,_params- Returns:
- Method
-
getAllMethod
public static Collection<Method> getAllMethod(Class<?> _class, Class<?>... _params)
Get all public methods current class- Parameters:
_class- ,_params- Returns:
- list
-
getMethod
public static Method getMethod(Class<?> _class, String _method, Object... _param)
Get method current class- Parameters:
_class- ,_method,_params- Returns:
- Method
-
getMethod
public static Method getMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel, Class<?>... _classes)
Get field current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,default- Parameters:
_class- ,_method,_accessLevel,_param- Returns:
- Field
-
getMethod
public static Method getMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel, Object... _param)
Get field current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,default- Parameters:
_class- ,_method,_accessLevel,_param- Returns:
- Field
-
getAllMethod
public static Collection<Method> getAllMethod(Class<?> _class)
Get all public methods current class- Parameters:
_class-- Returns:
- List
-
getAllMethod
public static Collection<Method> getAllMethod(Class<?> _class, ReflectionAccess _accessLevel)
Get methods of current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,default- Parameters:
_class- ,_method,_accessLevel,_classes- Returns:
- List
-
getAllOverloadMethod
public static List<Method> getAllOverloadMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel)
Get all overloaded method of current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,default- Parameters:
_class- ,_method,_accessLevel,_classes- Returns:
- List
-
getMethod
public static Method getMethod(Class<?> _class, String _method, int params, ReflectionAccess _accessLevel)
-
getAllOverrideMethod
public static List<Method> getAllOverrideMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel, Object... _param)
Get all overloaded method of current class with following condition :
PRIVATE can access all protected , public , private , default field
PROTECTED can access only protected , public
PUBLIC can access only public
DEFAULT can access only protected , public ,default- Parameters:
_class- ,_method,_accessLevel,_classes- Returns:
- List
-
isGetter
public static boolean isGetter(Method _method)
-
isSetter
public static boolean isSetter(Method _method)
-
findMethod
public static Method findMethod(Class<?> _class, String _method, ReflectionAccess _accessLevel, Class<?>... paramClasses)
-
-