Just in case if someone want to test the matching expressions (such as
ones used in root/field-expression), you can use the following code,
i.e. stick it to the tests for the dso-l1 project or have dso-l1 project
as dependency.
public static void main(String[] args) {
ExpressionHelper expressionHelper = new ExpressionHelper();
ExpressionVisitor visitor =
expressionHelper.createExpressionVisitor("get(private static final
org.joda.time.DateTimeFieldType org.joda.time.DateTimeFieldType.*)");
}
Then you can quickly test various expressions. Exception will be
thrown if expression is not valid.
To test the matching you can also use the following code:
FieldInfo info = AsmFieldInfo.getFieldInfo(...);
visitor.match(new ExpressionContext(PointcutType.GET, info, info));
Note that method and class matching should use different PointcutType
and pountcut expression - accordindly execution(...) and within(..).
regards,
Eugene
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev