@Override public String toUMLString() { String str = this.cc.toUMLString(); String newString = ""; int index = str.indexOf("|"); int index2 = str.indexOf("}\"") + 2; if (this.cc.getPatternDetector().get(this.name)) { newString = str; for (ClassClass c : this.cc.getAllPatternClassClassInfo()) { newString = newString + c.toUMLString(); } return newString; } for (int i = 0; i < str.length(); i++) { if (i == index) { newString += "\\<\\<Component\\>\\>"; } else if (i == index2) { newString = newString + "\n" + "\t style=\"filled\"\n"; newString = newString + "\t fillcolor=\"green\"\n"; } newString += str.charAt(i); } return newString; }
public ComponentClass(ClassClass cc) { super( cc.getMethods(), cc.getFields(), cc.getSuperclassname(), cc.getInterfacesname(), cc.getAccess(), cc.getClassname(), cc.isInterface(), cc.isAbstract(), cc.getDpd()); this.cc = cc; this.name = "Decorator"; }
public boolean writeClasses(ConstantPool consts, ConstantPool sharedconsts) { ClassClass classes[] = ClassClass.getClassVector(classMaker); ClassClass.setTypes(); // write out some constant pool stuff here, writeProlog(); try { writeAllNativeTables(classes); } catch (RuntimeException e) { out.flush(); System.out.println(e); e.printStackTrace(System.out); formatError = true; } writeEpilog(); return (!formatError) && (!out.checkError()); }