예제 #1
0
 protected boolean _isIncludableMethod(Method m, MethodFilter filter) {
   if (filter != null && !filter.includeMethod(m)) {
     return false;
   }
   /* 07-Apr-2009, tatu: Looks like generics can introduce hidden
    *   bridge and/or synthetic methods. I don't think we want to
    *   consider those...
    */
   if (m.isSynthetic() || m.isBridge()) {
     return false;
   }
   return true;
 }
예제 #2
0
  public Collection<DynamicObject> filterMethods(
      Map<String, InternalMethod> allMethods, MethodFilter filter) {
    final Map<String, InternalMethod> methods =
        ModuleOperations.withoutUndefinedMethods(allMethods);

    final Set<DynamicObject> filtered = new HashSet<>();
    for (InternalMethod method : methods.values()) {
      if (filter.filter(method)) {
        filtered.add(getContext().getSymbolTable().getSymbol(method.getName()));
      }
    }

    return filtered;
  }