Class ReflectionUtils
java.lang.Object
mg.emberframework.utils.reflection.ReflectionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
executeClassMethod
(Class<?> clazz, String methodName, Object... args) static Object
executeMethod
(Object object, String methodName, Object... args) static Object
executeRequestMethod
(Mapping mapping, jakarta.servlet.http.HttpServletRequest request, String verb) static void
setObjectAttributesValues
(Object instance, Field field, String value) static void
setSessionAttribute
(Object object, jakarta.servlet.http.HttpServletRequest request)
-
Method Details
-
setObjectAttributesValues
public static void setObjectAttributesValues(Object instance, Field field, String value) throws SecurityException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException -
setSessionAttribute
public static void setSessionAttribute(Object object, jakarta.servlet.http.HttpServletRequest request) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException -
executeRequestMethod
public static Object executeRequestMethod(Mapping mapping, jakarta.servlet.http.HttpServletRequest request, String verb) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException, AnnotationNotPresentException, InvalidRequestException, IOException, jakarta.servlet.ServletException - Throws:
NoSuchMethodException
SecurityException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
InstantiationException
AnnotationNotPresentException
InvalidRequestException
IOException
jakarta.servlet.ServletException
-
executeMethod
public static Object executeMethod(Object object, String methodName, Object... args) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException -
executeClassMethod
public static Object executeClassMethod(Class<?> clazz, String methodName, Object... args) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException
-