private Constraint addInterfaceConstraint(ReflectClass claxx) { Collection4 classes = stream().classCollection().forInterface(claxx); if (classes.size() == 0) { QConClass qcc = new QConClass(_trans, null, null, claxx); addConstraint(qcc); return qcc; } Iterator4 i = classes.iterator(); Constraint constr = null; while (i.moveNext()) { ClassMetadata classMetadata = (ClassMetadata) i.current(); ReflectClass classMetadataClaxx = classMetadata.classReflector(); if (classMetadataClaxx != null) { if (!classMetadataClaxx.isInterface()) { if (constr == null) { constr = constrain(classMetadataClaxx); } else { constr = constr.or(constrain(classMetadata.classReflector())); } } } } return constr; }
public final void read(ObjectContainerBase stream, ClassMetadata clazz, ByteArrayBuffer reader) { clazz.setAncestor(stream.classMetadataForId(reader.readInt())); if (clazz.callConstructor()) { // The logic further down checks the ancestor YapClass, whether // or not it is allowed, not to call constructors. The ancestor // YapClass may possibly have not been loaded yet. clazz.createConstructor(stream, clazz.classReflector(), clazz.getName(), true); } clazz.checkType(); readIndex(stream, clazz, reader); clazz._aspects = createFields(clazz, reader.readInt()); readFields(stream, reader, clazz._aspects); }