Package io.joynr.util
Class ReflectionUtils
- java.lang.Object
-
- io.joynr.util.ReflectionUtils
-
public class ReflectionUtils extends Object
Utility methods for the reflection part of Joyn-RPC
-
-
Constructor Summary
Constructors Constructor Description ReflectionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<List<Annotation>>findAndMergeParameterAnnotations(Method method)Utility function to find all annotations on the parameters of the specified method and merge them with the same annotations on all base classes and interfaces.static MethodfindMethodByParamTypeNames(Class<?> clazz, String methodName, List<String> paramTypeNames)static MethodfindMethodByParamTypes(Class<?> clazz, String methodName, Class<?>[] parameterTypes)static List<Method>findMethodsByName(Class<?> clazz, String methodName)static MethodgetStaticMethodFromSuperInterfaces(Class<?> clazz, String methodName)static String[]toDatatypeNames(Class<?>... types)static Class<?>[]toJavaClasses(String... typeNames)
-
-
-
Method Detail
-
findMethodsByName
public static List<Method> findMethodsByName(Class<?> clazz, String methodName) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
findMethodByParamTypes
public static Method findMethodByParamTypes(Class<?> clazz, String methodName, Class<?>[] parameterTypes) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
findMethodByParamTypeNames
public static Method findMethodByParamTypeNames(Class<?> clazz, String methodName, List<String> paramTypeNames) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
findAndMergeParameterAnnotations
public static List<List<Annotation>> findAndMergeParameterAnnotations(Method method)
Utility function to find all annotations on the parameters of the specified method and merge them with the same annotations on all base classes and interfaces.- Parameters:
method- the method in question- Returns:
- the list of annotations for this method
-
getStaticMethodFromSuperInterfaces
public static Method getStaticMethodFromSuperInterfaces(Class<?> clazz, String methodName) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
-