Search in sources :

Example 21 with Pointcut

use of com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut in project newrelic-java-agent by newrelic.

the class ExtensionConversionUtilityTest method createClassMatcher_empty.

@Test(expected = XmlException.class)
public void createClassMatcher_empty() throws XmlException {
    Pointcut pointcut = new Pointcut();
    ClassName name = new ClassName();
    name.setValue(ArrayList.class.getName());
    ExtensionConversionUtility.createClassMatcher(pointcut, "test");
}
Also used : Pointcut(com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut) ClassName(com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut.ClassName) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 22 with Pointcut

use of com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut in project newrelic-java-agent by newrelic.

the class ExtensionConversionUtilityTest method createClassMatcherAnnotation.

@Test(expected = XmlException.class)
public void createClassMatcherAnnotation() throws XmlException {
    Pointcut pointcut = new Pointcut();
    pointcut.setMethodAnnotation("com.some.Annotation");
    ExtensionConversionUtility.createClassMatcher(pointcut, "test");
}
Also used : Pointcut(com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut) Test(org.junit.Test)

Aggregations

Pointcut (com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut)22 Test (org.junit.Test)19 Instrumentation (com.newrelic.agent.extension.beans.Extension.Instrumentation)17 Extension (com.newrelic.agent.extension.beans.Extension)16 Method (com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut.Method)12 ExtensionClassAndMethodMatcher (com.newrelic.agent.instrumentation.custom.ExtensionClassAndMethodMatcher)9 HashMap (java.util.HashMap)7 HashSet (java.util.HashSet)6 MethodParameters (com.newrelic.agent.extension.beans.MethodParameters)4 ArrayList (java.util.ArrayList)4 ClassName (com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut.ClassName)2 AgentHelper.getFile (com.newrelic.agent.AgentHelper.getFile)1 XmlException (com.newrelic.agent.extension.util.XmlException)1 ChildClassMatcher (com.newrelic.agent.instrumentation.classmatchers.ChildClassMatcher)1 ClassMatcher (com.newrelic.agent.instrumentation.classmatchers.ClassMatcher)1 ExactClassMatcher (com.newrelic.agent.instrumentation.classmatchers.ExactClassMatcher)1 InterfaceMatcher (com.newrelic.agent.instrumentation.classmatchers.InterfaceMatcher)1 ExactReturnTypeMethodMatcher (com.newrelic.agent.instrumentation.methodmatchers.ExactReturnTypeMethodMatcher)1 File (java.io.File)1