for (final AnnotatedParam param : method.getParams()) { if (getRequestAnnotation(param, requestParams) == null) { final String name = getName(param); typeToString(method.getGenericReturnType())); .getName() : namespace + "." + method.getName(); desc.put("method", methodName); desc.put("params", descParams); final String innerNamespace = method.getAnnotation( Namespace.class).value(); methods.putAll(_describe( method.getActualMethod().invoke(c, (Object[]) null), requestParams, innerNamespace, auth));
AnnotatedMethod annotatedMethod = null; try { annotatedMethod = new AnnotationUtil.AnnotatedMethod(method); } catch (final Exception e) { LOG.log(Level.WARNING, "Method can't be used as annotated method", .getParams();
final MethodHandle methodHandle = annotatedMethod.getMethodHandle(); final Method method = annotatedMethod.getActualMethod(); request.getParams(), annotatedMethod.getParams(), requestParams); result = methodHandle.invokeExact(params); } else { final Object[] params = castParams(request.getParams(), annotatedMethod.getParams(), requestParams); result = method.invoke(realDest, params);
for (final AnnotatedMethod method : methodPath) { if (method != null) { newDestination = method.getActualMethod().invoke(destination, (Object[]) null);
return false; Access methodAccess = method.getAnnotation(Access.class); if (destination != null && !method.getActualMethod().getDeclaringClass() .isAssignableFrom(destination.getClass())) { return false; final int mod = method.getActualMethod().getModifiers(); if (!(Modifier.isPublic(mod) && hasNamedParams(method, requestParams))) { return false; .getActualMethod().getDeclaringClass()).getAnnotation( Access.class); if (methodAccess == null) {
.getMethods(method.getName()); for (AnnotatedMethod m : list) { if (m.getAnnotation(NoReply.class) != null) { doSync = false;
for (final AnnotatedMethod method : clazz .getAnnotatedMethods(Namespace.class)) { String namespace = method.getAnnotation(Namespace.class).value(); final Object newDest = method.getActualMethod().invoke(destination, (Object[]) null); if (namespace.equals("*")) {
if (available) { final String name = method.getName(); if (methodNames.contains(name)) { errors.add("Public method '"
/** * Test whether a method has named parameters. * * @param method * the method * @param requestParams * the request params * @return hasNamedParams */ private static boolean hasNamedParams(final AnnotatedMethod method, final RequestParams requestParams) { for (final AnnotatedParam param : method.getParams()) { boolean found = false; for (final Annotation a : param.getAnnotations()) { if (requestParams != null && requestParams.has(a)) { found = true; break; } else if (a instanceof Name) { found = true; break; } } if (!found) { return false; } } return true; }