- private boolean match(Method m, String s) { return match(m.getAnnotation(bind.as.class), null, s); }
- private boolean match(bind.as t, Class c, String s) {
- if (t==null) return false;
- if (t.value().equals(s)) return true;
- if (c != null && t.equals("") && c.getSimpleName().equals(s)) return true;
- return false;
- }
- /*
- private boolean match(nonterminal t, Class c, String s) {
- if (t==null) return false;
- if (t.value().equals(s)) return true;
- if (c != null && t.equals("") && c.getSimpleName().equals(s)) return true;
- return false;
- }
- */
- private boolean match(Class c, String s, String nonTerminalName) {
- if (match((bind.as)c.getAnnotation(bind.as.class), c, s)) return true;
- //if (match((nonterminal)c.getAnnotation(bind.as.class), c, nonTerminalName)) return true;
- return false;
- }
- public boolean match(Constructor con, String s, String nonTerminalName) {
- Class c = con.getDeclaringClass();
- if (match((bind.as)con.getAnnotation(bind.as.class), null, s)) return true;
- //if (match((nonterminal)con.getAnnotation(bind.as.class), c, s)) return true;
- return false;
- }