use of com.newrelic.agent.instrumentation.classmatchers.OrClassMatcher in project newrelic-java-agent by newrelic.
the class InstrumentationConstructorTest method andOrClassMatchers.
@Test
public void andOrClassMatchers() throws Exception {
String classes = "[ !exact_class_matcher 'java/lang/Dude', !exact_class_matcher 'java/lang/Object' ]";
ClassMatcher[] matchers = new ClassMatcher[] { new ExactClassMatcher("java/lang/Dude"), new ExactClassMatcher("java/lang/Object") };
AndClassMatcher classMatcher = load("!and_class_matcher " + classes);
Assert.assertEquals(new AndClassMatcher(matchers), classMatcher);
ClassMatcher orClassMatcher = load("!or_class_matcher " + classes);
Assert.assertEquals(OrClassMatcher.getClassMatcher(matchers), orClassMatcher);
}
Aggregations