/** * {@inheritDoc} */ @Override public boolean addInstrumentationPoints(AgentConfig agentConfiguration, ClassType classType) { boolean added = false; if (matches(classType)) { for (MethodType methodType : classType.getMethods()) { if (matches(methodType)) { MethodInstrumentationConfig methodInstrumentationConfig = getOrCreateMethodInstrumentationConfig(methodType); applyAssignment(agentConfiguration, methodType, methodInstrumentationConfig); added = true; } } } return added; }
/** * {@inheritDoc} */ @Override public boolean removeInstrumentationPoints(ClassType classType) { if (!classType.hasInstrumentationPoints()) { return false; } boolean removed = false; if (matches(classType)) { for (MethodType methodType : classType.getMethods()) { if (matches(methodType)) { methodType.setMethodInstrumentationConfig(null); removed = true; } } } return removed; }