JavaMethod jm = jic.newJavaMethod("equals", boolean.class, JavaSource.PUBLIC);
DirectAccessible o = jm.addParam(Object.class, "o");
jm.addIf(o, " == null || !(", o, " instanceof ", jic.getQName(), ")");
jm.addLine("return false;");
jm.addEndIf();
LocalJavaField other = jm.newJavaField(jic.getQName(), "other");
other.addLine("(", jic.getQName(), ") ", o);
jm.addIf("!", name, ".equals(", other, ".name) || ", values, ".length != ",
other, ".values.length");
jm.addLine("return false;");
jm.addEndIf();