private static Method getMethodInPublic(
	Class<?> cls, String mtdnm, Class<?>[] argTypes, String filename, int lineno)
	throws NoSuchMethodException {
		final Method m = cls.getMethod(mtdnm, argTypes);
		if (Modifier.isPublic(m.getDeclaringClass().getModifiers()))
			return m;

		final Class<?>[] clses = cls.getInterfaces();
		for (int j = 0; j< clses.length; ++j)
			try {
				return getMethodInPublic(clses[j], mtdnm, argTypes, filename, lineno);
			} catch (NoSuchMethodException ex) { //ignore it
			}

		final Class<?> basecls = cls.getSuperclass();
		if (basecls != null)
			return getMethodInPublic(basecls, mtdnm, argTypes, filename, lineno);

		throw new ZussException("public method required: "+m, filename, lineno);
	}