wu-sheng commented on PR #9828:
URL: https://github.com/apache/skywalking/pull/9828#issuecomment-1286892749
This is how we are going to extend AnalyzerModuleProvider with a new
configuration class without copy codes. All methods in AnalyzerModuleProvider
still work, of course, you could override them and call `super.xxx` then add
new logic.
```java
public class AnalyzerModuleProviderExt extends AnalyzerModuleProvider{
private NewConfig config;
@Override
public ConfigCreator newConfigCreator() {
final ConfigCreator parentConfigCreator = super.newConfigCreator();
return new ConfigCreator<NewConfig>() {
@Override
public Class type() {
return NewConfig.class;
}
@Override
public void onInitialized(final NewConfig initialized) {
config = initialized;
parentConfigCreator.onInitialized(initialized);
}
};
}
public static class NewConfig extends AnalyzerModuleConfig {
private String newField;
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]