/** * If method should be instrumented. If there is appropriate {@link MethodInstrumentationConfig} * that denotes that method should be instrumented this will be removed from the * {@link #instrumentationConfigs} and returned as a result. * * @param name * Name of the method. * @param desc * ASM description of the method. * @return {@link MethodInstrumentationConfig} if method should be instrumented, otherwise * <code>null</code> */ private MethodInstrumentationConfig shouldInstrument(String name, String desc) { for (Iterator<MethodInstrumentationConfig> it = instrumentationConfigs.iterator(); it.hasNext();) { MethodInstrumentationConfig config = it.next(); if (matches(name, desc, config)) { it.remove(); return config; } } return null; }