public void add(Method method) { if (method.getClassName().equals(name)) { methods.add(method);
public void add(Field field) { if (field.getClassName().equals(name)) { fields.add(field);
    public void add(Method method) {        if (method.getClassName().equals(name)) {            methods.add(method);        } else {            throw new IllegalArgumentException(                    "The method must be a member of this class!");        }    }