/** * Gibt alle Fields inkl. der Fields der Super-Interfaces zurück * * @return org.jacorb.ir.gui.typesystem.TypeSystemNode[] */ public TypeSystemNode[] getAllFields() { if (this.allFields == null) { Vector fields = new java.util.Vector(); // erstmal die Fields der superInterfaces sammeln Interface[] superInterfaces = this.getSuperInterfaces(); for (int i = 0; i < superInterfaces.length; i++) { TypeSystemNode[] nextFields = superInterfaces[i].getAllFields(); for (int n = 0; n < nextFields.length; n++) { fields.addElement(nextFields[n]); } } // dann unsere eigenen Fields (also die Attributes des Interfaces) ModelParticipant[] contents = this.contents(); for (int i = 0; i < contents.length; i++) { if (contents[i] instanceof IRAttribute) { fields.addElement(contents[i]); } } this.allFields = new IRAttribute[fields.size()]; int i = 0; for (Enumeration e = fields.elements(); e.hasMoreElements(); ) { allFields[i] = (IRAttribute) e.nextElement(); i++; } } // if (allFields==null) return allFields; }
/** * Gibt alle Fields inkl. der Fields der Super-Interfaces zurück * * @return org.jacorb.ir.gui.typesystem.TypeSystemNode[] */ public TypeSystemNode[] getAllOperations() { if (this.allOperations == null) { Vector operations = new java.util.Vector(); // erstmal die Operationen der superInterfaces sammeln Interface[] superInterfaces = this.getSuperInterfaces(); for (int i = 0; i < superInterfaces.length; i++) { TypeSystemNode[] nextOperations = superInterfaces[i].getAllOperations(); for (int n = 0; n < nextOperations.length; n++) { operations.addElement(nextOperations[n]); } } // dann unsere eigenen Operationen ModelParticipant[] contents = this.contents(); for (int i = 0; i < contents.length; i++) { if (contents[i] instanceof IROperation) { operations.addElement(contents[i]); } } this.allOperations = new IROperation[operations.size()]; int i = 0; for (Enumeration e = operations.elements(); e.hasMoreElements(); ) { allOperations[i] = (IROperation) e.nextElement(); i++; } } // if (allOperations==null) return allOperations; }