com.newrelic.weave.violation.METHOD_INDIRECT_INTERFACE_WEAVE.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of newrelic-weaver Show documentation
Show all versions of newrelic-weaver Show documentation
The Weaver of the Java agent.
## METHOD_INDIRECT_INTERFACE_WEAVE ##
###Description###
This violation was raised because the @Weave class with a match type of Interface is attempting to weave a method that is inherited from an extended interface. Only methods declared in an interface can be weaved.
###Example###
####Original Class####
```
public interface Indirect {
void indirectMethod();
}
```
```
public interface Direct extends Indirect {
void directMethod();
}
```
####Bad####
```
@Weave(type = MatchType.Interface)
public class Direct {
public void directMethod() {
}
public void indirectMethod() {
// Causes violation
}
}
```
© 2015 - 2024 Weber Informatics LLC | Privacy Policy