////////////////////////////////////////////////////////////////////////// // Collection (@collection) ////////////////////////////////////////////////////////////////////////// private bool writeCollectionItems(Type type, object obj, bool first) { // lookup each method Method m = type.method("each", false); if (m == null) { throw IOErr.make("Missing " + type.qname() + ".each").val; } // call each(it) EachIterator it = new EachIterator(this, first); m.invoke(obj, new object[] { it }); return(it.first); }
////////////////////////////////////////////////////////////////////////// // Collection (@collection) ////////////////////////////////////////////////////////////////////////// private bool writeCollectionItems(Type type, object obj, bool first) { // lookup each method Method m = type.method("each", false); if (m == null) throw IOErr.make("Missing " + type.qname() + ".each").val; // call each(it) EachIterator it = new EachIterator(this, first); m.invoke(obj, new object[] { it }); return it.first; }