public static <X extends RemoteEnvironment> void processClassAnnotations(InjectionContainer container, Collection<InjectionHandler<X>> handlers, Class<?> clazz) { if (clazz == null || clazz.equals(Object.class)) { return; } if (handlers != null) { for (InjectionHandler<?> handler : handlers) { handler.handleClassAnnotations(clazz, container); } } // recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored processClassAnnotations(container, handlers, clazz.getSuperclass()); }
public static <X extends RemoteEnvironment> void processFieldAnnotations(InjectionContainer container, Collection<InjectionHandler<X>> handlers, Class<?> clazz, Map<AccessibleObject, Injector> classInjectors) { if (clazz == null || clazz.equals(Object.class)) { return; } if (handlers != null) { Field[] fields = clazz.getDeclaredFields(); for (Field field : fields) { log.trace("process field annotation for " + field.toGenericString()); for (InjectionHandler<?> handler : handlers) { handler.handleFieldAnnotations(field, container, classInjectors); } } } // recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored processFieldAnnotations(container, handlers, clazz.getSuperclass(), classInjectors); }
public static <X extends RemoteEnvironment> void processMethodAnnotations(InjectionContainer container, Collection<InjectionHandler<X>> handlers, Set<String> visitedMethods, Class<?> clazz, Map<AccessibleObject, Injector> classInjectors) { if (clazz == null || clazz.equals(Object.class)) { return; } Method[] methods = clazz.getDeclaredMethods(); for (Method method : methods) { if (method.getParameterTypes().length != 1) continue; if (!Modifier.isPrivate(method.getModifiers())) { if (visitedMethods.contains(method.getName())) { continue; } visitedMethods.add(method.getName()); } if (handlers != null) { for (InjectionHandler<?> handler : handlers) { handler.handleMethodAnnotations(method, container, classInjectors); } } } // recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored processMethodAnnotations(container, handlers, visitedMethods, clazz.getSuperclass(), classInjectors); }
handler.loadXml(webDD.getJndiEnvironmentRefsGroup(), this);
handler.loadXml(xml, this);
handler.loadXml(clientMetaData, this);