public Object visit(FalseNode node, Object data) {
return Boolean.FALSE;
}
public Object visit(Anonymous node, Object data) {
ExpressionContext ctx = (ExpressionContext)data;
String expr = node.name;
if (expr.startsWith("cflow(")) {
return null;//Boolean.TRUE;
} else {
Expression expression = null;
ExpressionNamespace ns = ctx.getNamespace();
if (expr.startsWith("execution(")) {
expression = ns.createExecutionExpression(
expr.substring(10, expr.length()-1),
"",""
);
} else if (expr.startsWith("call(")) {
expression = ns.createCallExpression(
expr.substring(5, expr.length()-1),
"",""
);
} else if (expr.startsWith("set(")) {
expression = ns.createSetExpression(
expr.substring(4, expr.length()-1),
"",""
);
} else if (expr.startsWith("get(")) {
expression = ns.createGetExpression(
expr.substring(4, expr.length()-1),
"",""
);
} else if (expr.startsWith("class(")) {
expression = ns.createClassExpression(
expr.substring(6, expr.length()-1),
"",""
);
} else if (expr.startsWith("handler(")) {
expression = ns.createHandlerExpression(
expr.substring(8, expr.length()-1),
"",""
);
} else if (expr.startsWith("attribute(")) {
expression = ns.createAttributeExpression(
expr.substring(10, expr.length()-1),
""
);
} else {
throw new RuntimeException("unknown anonymous: "+expr);
}
if (expression.match(
ctx.getClassMetaData(), ctx.getMemberMetaData(), ctx.getExceptionType(), ctx.getPointcutType())) {
return Boolean.TRUE;
} else {
return Boolean.FALSE;
}
}