wu-sheng commented on a change in pull request #6103:
URL: https://github.com/apache/skywalking/pull/6103#discussion_r550076964
##########
File path: docs/en/guides/Java-Plugin-Development-Guide.md
##########
@@ -299,6 +299,30 @@ The following sections will tell you how to implement the
interceptor.
tomcat-7.x/8.x=TomcatInstrumentation
```
+4. If a plugin should be activated or not in different condition.You can
Override the witnessClasses or witnessMethods.
+
+ Example:
+
+ ```java
+ //the plugin is activated only when the foo.Bar class exists.
+ @Override
+ protected String[] witnessClasses() {
+ return new String[] {
+ "foo.Bar"
+ };
+ }
+
+ //the plugin is activated only when the foo.Bar#hello method exists.
+ @Override
+ protected List<WitnessMethod> witnessClasses() {
Review comment:
```suggestion
protected List<WitnessMethod> witnessMethods() {
```
Copy/paste issue?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]