下面列出了怎么用javax.xml.bind.annotation.XmlRegistry的API类实例代码及写法,或者点击链接到github查看源代码。
private Method findMethod(Class<?>[] classes, Class<?> parameterClass) {
for (Class<?> clazz : classes) {
if (nonNull(clazz.getAnnotation(XmlRegistry.class))) {
for (Method method : ReflectionUtils.getAllDeclaredMethods(clazz)) {
if (byParameterType(method, parameterClass) && byReturnType(method, parameterClass) && byAnnotation(method)) {
return method;
}
}
}
}
return null;
}