private void checkContextMethod(Method m, Object provider) { Class<?> type = m.getParameterTypes()[0]; if (type.isInterface() || type == Application.class) { checkContextClass(type); addContextMethod(type, m, provider); } }
private void findContextFields(Class<?> cls, Object provider) { if (cls == Object.class || cls == null) { return; } for (Field f : cls.getDeclaredFields()) { for (Annotation a : f.getAnnotations()) { if (a.annotationType() == Context.class) { contextFields = addContextField(contextFields, f); if (f.getType().isInterface()) { checkContextClass(f.getType()); addToMap(getFieldProxyMap(true), f, getFieldThreadLocalProxy(f, provider)); } } } } findContextFields(cls.getSuperclass(), provider); }