@Override public void visitAbstractSetterMethod(AbstractSetterMethod setterMethod) { final Method m = setterMethod.getMethod(); checkParameter(setterMethod.getParameters().get(0), m, m.toGenericString(), "1"); }
private static void workOutSetterMethodsList( AbstractResource resource, MethodList methodList, boolean isEncoded) { for (AnnotatedMethod m : methodList. hasNotMetaAnnotation(HttpMethod.class). hasNotAnnotation(Path.class). hasNumParams(1). hasReturnType(void.class). nameStartsWith("set")) { final AbstractSetterMethod asm = new AbstractSetterMethod(resource, m.getMethod(), m.getAnnotations()); Parameter p = createParameter( resource.getResourceClass(), m.getMethod().getDeclaringClass(), isEncoded, m.getParameterTypes()[0], m.getGenericParameterTypes()[0], m.getAnnotations()); if (null != p) { asm.getParameters().add(p); resource.getSetterMethods().add(asm); } } }
private static void workOutSetterMethodsList( AbstractResource resource, MethodList methodList, boolean isEncoded) { for (AnnotatedMethod m : methodList. hasNotMetaAnnotation(HttpMethod.class). hasNotAnnotation(Path.class). hasNumParams(1). hasReturnType(void.class). nameStartsWith("set")) { final AbstractSetterMethod asm = new AbstractSetterMethod(resource, m.getMethod(), m.getAnnotations()); Parameter p = createParameter( resource.getResourceClass(), m.getMethod().getDeclaringClass(), isEncoded, m.getParameterTypes()[0], m.getGenericParameterTypes()[0], m.getAnnotations()); if (null != p) { asm.getParameters().add(p); resource.getSetterMethods().add(asm); } } }
Parameter p = sm.getParameters().get(0); InjectableScopePair isp = ipc.getInjectableiWithScope(sm.getMethod(), p, s); if (isp != null) { if (s == ComponentScope.PerRequest && isp.cs != ComponentScope.Singleton) { perRequest.put(sm.getMethod(), isp.i); } else { singletons.put(sm.getMethod(), isp.i); Errors.missingDependency(sm.getMethod(), methodIndex);
private static void workOutSetterMethodsList( AbstractResource resource, MethodList methodList, boolean isEncoded) { for (AnnotatedMethod m : methodList. hasNotMetaAnnotation(HttpMethod.class). hasNotAnnotation(Path.class). hasNumParams(1). hasReturnType(void.class). nameStartsWith("set")) { final AbstractSetterMethod asm = new AbstractSetterMethod(resource, m.getMethod(), m.getAnnotations()); Parameter p = createParameter( resource.getResourceClass(), m.getMethod().getDeclaringClass(), isEncoded, m.getParameterTypes()[0], m.getGenericParameterTypes()[0], m.getAnnotations()); if (null != p) { asm.getParameters().add(p); resource.getSetterMethods().add(asm); } } }
@Override public void visitAbstractSetterMethod(AbstractSetterMethod setterMethod) { final Method m = setterMethod.getMethod(); checkParameter(setterMethod.getParameters().get(0), m, m.toGenericString(), "1"); }
@Override public void visitAbstractSetterMethod(AbstractSetterMethod setterMethod) { final Method m = setterMethod.getMethod(); checkParameter(setterMethod.getParameters().get(0), m, m.toGenericString(), "1"); }
Parameter p = sm.getParameters().get(0); InjectableScopePair isp = ipc.getInjectableiWithScope(sm.getMethod(), p, s); if (isp != null) { if (s == ComponentScope.PerRequest && isp.cs != ComponentScope.Singleton) { perRequest.put(sm.getMethod(), isp.i); } else { singletons.put(sm.getMethod(), isp.i); Errors.missingDependency(sm.getMethod(), methodIndex);
Parameter p = sm.getParameters().get(0); InjectableScopePair isp = ipc.getInjectableiWithScope(sm.getMethod(), p, s); if (isp != null) { if (s == ComponentScope.PerRequest && isp.cs != ComponentScope.Singleton) { perRequest.put(sm.getMethod(), isp.i); } else { singletons.put(sm.getMethod(), isp.i); Errors.missingDependency(sm.getMethod(), methodIndex);