Esempio n. 1
0
 @Override
 public void visitClassContext(ClassContext classContext) {
   ConstantPoolGen cpg = classContext.getConstantPoolGen();
   List<InjectionSource> selectedSources = new ArrayList<InjectionSource>();
   for (InjectionSource source : getInjectionSource()) {
     if (source.isCandidate(cpg)) {
       selectedSources.add(source);
     }
   }
   if (selectedSources.isEmpty()) {
     // return; // analysis still must be requested
   }
   for (Method method : classContext.getMethodsInCallOrder()) {
     MethodGen methodGen = classContext.getMethodGen(method);
     if (methodGen == null) {
       continue;
     }
     try {
       analyzeMethod(classContext, method, selectedSources);
     } catch (CheckedAnalysisException e) {
       logException(classContext, method, e);
     } catch (RuntimeException e) {
       logException(classContext, method, e);
     }
   }
 }