/** * Analyze a method. * * @param classContext * ClassContext storing method analysis objects for method's * class * @param analysisClass * class the method analysis object should belong to * @param methodDescriptor * method descriptor identifying the method to analyze * @return the computed analysis object for the method * @throws CheckedAnalysisException */ @SuppressWarnings("unchecked") private <E> E analyzeMethod(ClassContext classContext, Class<E> analysisClass, MethodDescriptor methodDescriptor) throws CheckedAnalysisException { IMethodAnalysisEngine<E> engine = (IMethodAnalysisEngine<E>) methodAnalysisEngineMap.get(analysisClass); if (engine == null) { throw new IllegalArgumentException("No analysis engine registered to produce " + analysisClass.getName()); } Profiler profiler = getProfiler(); profiler.start(engine.getClass()); try { return engine.analyze(this, methodDescriptor); } finally { profiler.end(engine.getClass()); } }
throw new IllegalArgumentException("No analysis engine registered to produce " + analysisClass.getName()); Profiler profiler = getProfiler();
/** * Analyze a method. * * @param classContext * ClassContext storing method analysis objects for method's * class * @param analysisClass * class the method analysis object should belong to * @param methodDescriptor * method descriptor identifying the method to analyze * @return the computed analysis object for the method * @throws CheckedAnalysisException */ @SuppressWarnings("unchecked") private <E> E analyzeMethod(ClassContext classContext, Class<E> analysisClass, MethodDescriptor methodDescriptor) throws CheckedAnalysisException { IMethodAnalysisEngine<E> engine = (IMethodAnalysisEngine<E>) methodAnalysisEngineMap.get(analysisClass); if (engine == null) { throw new IllegalArgumentException("No analysis engine registered to produce " + analysisClass.getName()); } Profiler profiler = getProfiler(); profiler.start(engine.getClass()); try { return engine.analyze(this, methodDescriptor); } finally { profiler.end(engine.getClass()); } }
throw new IllegalArgumentException("No analysis engine registered to produce " + analysisClass.getName()); Profiler profiler = getProfiler();