mg.getField(classType, "schema", Type.getType(Schema.class));
// seenRefs Set
mg.invokeStatic(Type.getType(Sets.class), getMethod(Set.class, "newIdentityHashSet"));
mg.invokeVirtual(classType, getEncodeMethod(outputType, schema));
mg.returnValue();
mg.endMethod();
}
/**
* Returns the encode method for the given type and schema. The same method will be returned if the same
* type and schema has been passed to the method before.