/** * Gets the. * * @param annotation * the annotation * @return the object */ public Object get(final Annotation annotation) { return get(annotation.annotationType()); }
/** * Checks for. * * @param annotation * the annotation * @return true, if successful */ public boolean has(final Annotation annotation) { return has(annotation.annotationType()); }
if (jsonMsg.isRequest()) { final JSONRequest request = (JSONRequest) jsonMsg; final RequestParams params = new RequestParams(); params.put(Sender.class, senderUrl.toASCIIString()); return JSONRpc.invoke(destination.get(), request, params, auth); } else if (jsonMsg.isResponse() && callbacks != null && id != null
/** * Find a request annotation in the given parameters Returns null if no * system annotation is not found. * * @param param * the param * @param requestParams * the request params * @return annotation */ private static Annotation getRequestAnnotation(final AnnotatedParam param, final RequestParams requestParams) { for (final Annotation annotation : param.getAnnotations()) { if (requestParams != null && requestParams.has(annotation)) { return annotation; } } return null; }
if (a != null) { objects[i + offset] = requestParams.get(a); } else { final String name = getName(p);
/** * 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; }