DslPointcut (final Object arg) { assert arg instanceof Map; assert ((Map<?, ?>)arg).size() == 1; final String name = (String)((Map)arg).keySet().iterator().next(); final DslPointcut pct = (DslPointcut)((Map)arg).values().iterator().next(); return new DslPointcut() { @Override List matches(Object src, ProcessingContext context) { final List result = pct.matches(src, context); if (result != null) { Map<String, List> map = context.get(BOUND); if (map == null) { context.put(BOUND, map = new HashMap<>()); } map.put(name, result); } return result; } @Override boolean operatesOn(Class c) { return pct.operatesOn(c); } }; }