use of com.navercorp.pinpoint.bootstrap.instrument.matcher.operand.ClassInternalNameMatcherOperand in project pinpoint by naver.
the class DefaultClassBasedMatcherTest method getMatcherOperandWithClassName.
@Test
public void getMatcherOperandWithClassName() {
DefaultClassBasedMatcher matcher = new DefaultClassBasedMatcher("java.lang.String");
assertEquals("java.lang.String", matcher.getBaseClassName());
MatcherOperand operand = matcher.getMatcherOperand();
assertTrue(operand instanceof ClassInternalNameMatcherOperand);
ClassInternalNameMatcherOperand classInternalNameMatcherOperand = (ClassInternalNameMatcherOperand) operand;
assertEquals("java/lang/String", classInternalNameMatcherOperand.getClassInternalName());
}
use of com.navercorp.pinpoint.bootstrap.instrument.matcher.operand.ClassInternalNameMatcherOperand in project pinpoint by naver.
the class DefaultClassBasedMatcherTest method getMatcherOperandWithClassNameAndAdditional.
@Test
public void getMatcherOperandWithClassNameAndAdditional() {
InterfaceInternalNameMatcherOperand additional = new InterfaceInternalNameMatcherOperand("java/lang/Runnable", false);
DefaultClassBasedMatcher matcher = new DefaultClassBasedMatcher("java.lang.String", additional);
assertEquals("java.lang.String", matcher.getBaseClassName());
MatcherOperand operand = matcher.getMatcherOperand();
assertTrue(operand instanceof AndMatcherOperator);
AndMatcherOperator operator = (AndMatcherOperator) operand;
assertTrue(operator.getLeftOperand() instanceof ClassInternalNameMatcherOperand);
assertTrue(operator.getRightOperand() instanceof InterfaceInternalNameMatcherOperand);
}
use of com.navercorp.pinpoint.bootstrap.instrument.matcher.operand.ClassInternalNameMatcherOperand in project pinpoint by naver.
the class AndMatcherOperatorTest method base.
@Test
public void base() throws Exception {
AndMatcherOperator operator = new AndMatcherOperator(new ClassInternalNameMatcherOperand("java/lang/String"), new InterfaceInternalNameMatcherOperand("java/lang/Serializable", false));
assertEquals(2, operator.getPrecedence());
assertTrue(operator.isOperator());
assertFalse(operator.isIndex());
assertTrue(operator.getLeftOperand() instanceof ClassInternalNameMatcherOperand);
assertTrue(operator.getRightOperand() instanceof InterfaceInternalNameMatcherOperand);
assertEquals(3, operator.getExecutionCost());
}
use of com.navercorp.pinpoint.bootstrap.instrument.matcher.operand.ClassInternalNameMatcherOperand in project pinpoint by naver.
the class OrMatcherOperatorTest method base.
@Test
public void base() throws Exception {
OrMatcherOperator operator = new OrMatcherOperator(new ClassInternalNameMatcherOperand("java/lang/String"), new InterfaceInternalNameMatcherOperand("java/lang/Serializable", false));
assertEquals(1, operator.getPrecedence());
assertNotNull(operator.getLeftOperand());
assertNotNull(operator.getRightOperand());
assertFalse(operator.isIndex());
assertTrue(operator.isOperator());
assertEquals(3, operator.getExecutionCost());
}
Aggregations