code: public static BshMethod getDeclaredMethod(Class<?> type, String name, Class<?>[] sig) {
          if (!isGeneratedClass(type))
              return null;
          BshMethod meth = getMethod(type, name, sig);
          if (null == meth && !type.isInterface())
              return getMethod(getNewInstance(type), name, sig);
          return meth;
      }
docs: /*
  Get method from either class static or object instance namespaces