/** * Checks if the {@link SensorInstrumentationPoint} exists in the * {@link MethodInstrumentationConfig}. If not new one is created, registered with registration * service and saved in the {@link MethodInstrumentationConfig}. * * @param agentConfiguration * {@link AgentConfig} to read platform id. * @param methodType * {@link MethodType} in question. * @param methodInstrumentationConfig * {@link MethodInstrumentationConfig}. * @return {@link SensorInstrumentationPoint} for the {@link MethodInstrumentationConfig}. */ protected SpecialInstrumentationPoint getOrCreateSpecialInstrumentationPoint(AgentConfig agentConfiguration, MethodType methodType, MethodInstrumentationConfig methodInstrumentationConfig) { // check for existing SpecialInstrumentationPoint specialInstrumentationPoint = methodInstrumentationConfig.getSpecialInstrumentationPoint(); // if not create new one if (null == specialInstrumentationPoint) { // if not create new and register long id = registerMethod(agentConfiguration, methodType, methodInstrumentationConfig); specialInstrumentationPoint = new SpecialInstrumentationPoint(); specialInstrumentationPoint.setId(id); // set to method instrumentation methodInstrumentationConfig.setSpecialInstrumentationPoint(specialInstrumentationPoint); } return specialInstrumentationPoint; }