_memberMethods = new AnnotatedMethodMap(); AnnotatedMethodMap mixins = new AnnotatedMethodMap(); if (!mixins.isEmpty()) { Iterator<AnnotatedMethod> it = mixins.iterator(); while (it.hasNext()) { AnnotatedMethod mixIn = it.next(); AnnotatedMethod am = _constructMethod(m); _addMixOvers(mixIn.getAnnotated(), am, false); _memberMethods.add(am);
public int getMemberMethodCount() { return _memberMethods.size(); }
protected void _addMethodMixIns(Class<?> targetClass, MethodFilter methodFilter, AnnotatedMethodMap methods, Class<?> mixInCls, AnnotatedMethodMap mixIns) { List<Class<?>> parents = new ArrayList<Class<?>>(); parents.add(mixInCls); ClassUtil.findSuperTypes(mixInCls, targetClass, parents); for (Class<?> mixin : parents) { for (Method m : mixin.getDeclaredMethods()) { if (!_isIncludableMethod(m, methodFilter)) { continue; } AnnotatedMethod am = methods.find(m); /* Do we already have a method to augment (from sub-class * that will mask this mixIn)? If so, add if visible * without masking (no such annotation) */ if (am != null) { _addMixUnders(m, am); /* Otherwise will have precedence, but must wait * until we find the real method (mixIn methods are * just placeholder, can't be called) */ } else { mixIns.add(_constructMethod(m)); } } } }
public AnnotatedMethod findMethod(String name, Class<?>[] paramTypes) { return _memberMethods.find(name, paramTypes); }
/** * Method called to remove specified method, assuming * it exists in the Map */ public AnnotatedMethod remove(AnnotatedMethod am) { return remove(am.getAnnotated()); }
protected void _addMethodMixIns(Class<?> targetClass, MethodFilter methodFilter, AnnotatedMethodMap methods, Class<?> mixInCls, AnnotatedMethodMap mixIns) { List<Class<?>> parents = new ArrayList<Class<?>>(); parents.add(mixInCls); ClassUtil.findSuperTypes(mixInCls, targetClass, parents); for (Class<?> mixin : parents) { for (Method m : mixin.getDeclaredMethods()) { if (!_isIncludableMethod(m, methodFilter)) { continue; } AnnotatedMethod am = methods.find(m); /* Do we already have a method to augment (from sub-class * that will mask this mixIn)? If so, add if visible * without masking (no such annotation) */ if (am != null) { _addMixUnders(m, am); /* Otherwise will have precedence, but must wait * until we find the real method (mixIn methods are * just placeholder, can't be called) */ } else { mixIns.add(_constructMethod(m)); } } } }
public AnnotatedMethod findMethod(String name, Class<?>[] paramTypes) { return _memberMethods.find(name, paramTypes); }
/** * Method called to remove specified method, assuming * it exists in the Map */ public AnnotatedMethod remove(AnnotatedMethod am) { return remove(am.getAnnotated()); }
_memberMethods = new AnnotatedMethodMap(); AnnotatedMethodMap mixins = new AnnotatedMethodMap(); if (!mixins.isEmpty()) { Iterator<AnnotatedMethod> it = mixins.iterator(); while (it.hasNext()) { AnnotatedMethod mixIn = it.next(); AnnotatedMethod am = _constructMethod(m); _addMixOvers(mixIn.getAnnotated(), am, false); _memberMethods.add(am);
protected void _addMethodMixIns(MethodFilter methodFilter, AnnotatedMethodMap methods, Class<?> mixInCls, AnnotatedMethodMap mixIns) { for (Method m : mixInCls.getDeclaredMethods()) { if (!_isIncludableMethod(m, methodFilter)) { continue; } AnnotatedMethod am = methods.find(m); /* Do we already have a method to augment (from sub-class * that will mask this mixIn)? If so, add if visible * without masking (no such annotation) */ if (am != null) { _addMixUnders(m, am); /* Otherwise will have precedence, but must wait * until we find the real method (mixIn methods are * just placeholder, can't be called) */ } else { mixIns.add(_constructMethod(m)); } } }
public AnnotatedMethod findMethod(String name, Class<?>[] paramTypes) { return _memberMethods.find(name, paramTypes); }
/** * Method called to remove specified method, assuming * it exists in the Map */ public AnnotatedMethod remove(AnnotatedMethod am) { return remove(am.getAnnotated()); }
public int getMemberMethodCount() { return _memberMethods.size(); }
_memberMethods = new AnnotatedMethodMap(); AnnotatedMethodMap mixins = new AnnotatedMethodMap(); if (!mixins.isEmpty()) { Iterator<AnnotatedMethod> it = mixins.iterator(); while (it.hasNext()) { AnnotatedMethod mixIn = it.next(); AnnotatedMethod am = _constructMethod(m); _addMixOvers(mixIn.getAnnotated(), am, false); _memberMethods.add(am); Iterator<AnnotatedMethod> it = _memberMethods.iterator(); while (it.hasNext()) { AnnotatedMethod am = it.next();
protected void _addMethodMixIns(MethodFilter methodFilter, AnnotatedMethodMap methods, Class<?> mixInCls, AnnotatedMethodMap mixIns) { for (Method m : mixInCls.getDeclaredMethods()) { if (!_isIncludableMethod(m, methodFilter)) { continue; } AnnotatedMethod am = methods.find(m); /* Do we already have a method to augment (from sub-class * that will mask this mixIn)? If so, add if visible * without masking (no such annotation) */ if (am != null) { _addMixUnders(m, am); /* Otherwise will have precedence, but must wait * until we find the real method (mixIn methods are * just placeholder, can't be called) */ } else { mixIns.add(_constructMethod(m)); } } }
public AnnotatedMethod findMethod(String name, Class<?>[] paramTypes) { return _memberMethods.find(name, paramTypes); }
/** * Method called to remove specified method, assuming * it exists in the Map */ public AnnotatedMethod remove(AnnotatedMethod am) { return remove(am.getAnnotated()); }