/** * Generates code for a single attribute. * * @param attr the AttributeDescriptor * @param field true if the class should have the associated field, or false if the field is in * the superclass * @return java code */ protected String generate(AttributeDescriptor attr, boolean field) { StringBuffer sb = new StringBuffer(); if (field) { sb.append(INDENT + "// Attr: " + attr.getClassDescriptor().getName() + "." + attr.getName() + ENDL) .append(INDENT + "protected ") .append(attr.getType()) .append(" ") .append(attr.getName()) .append(";" + ENDL); } sb.append(generateGetSet(attr, field)) .append(ENDL); return sb.toString(); }
/** * Generates code for a single attribute. * * @param attr the AttributeDescriptor * @param field true if the class should have the associated field, or false if the field is in * the superclass * @return java code */ protected String generate(AttributeDescriptor attr, boolean field) { StringBuffer sb = new StringBuffer(); if (field) { sb.append(INDENT + "// Attr: " + attr.getClassDescriptor().getName() + "." + attr.getName() + ENDL) .append(INDENT + "protected ") .append(attr.getType()) .append(" ") .append(attr.getName()) .append(";" + ENDL); } sb.append(generateGetSet(attr, field)) .append(ENDL); return sb.toString(); }
+ field.getClassDescriptor().getName() + "." + field.getName() + " (a " + type + ") and " + origField.getClassDescriptor().getName() + "." + origField.getName() + " (a " + origType + ") in truncated class " + cld.getName()
+ field.getClassDescriptor().getName() + "." + field.getName() + " (a " + type + ") and " + origField.getClassDescriptor().getName() + "." + origField.getName() + " (a " + origType + ") in truncated class " + cld.getName()
table.addRow(TextTable.ROW_SEPARATOR); for (AttributeDescriptor desc : getAllAttributeDescriptors()) { ClassDescriptor cld = desc.getClassDescriptor(); table.addRow(new String[] {desc.getName(), terseClass(desc.getType()), (cld == this ? "" : "from " + terseClass(cld.getName()))});
table.addRow(TextTable.ROW_SEPARATOR); for (AttributeDescriptor desc : getAllAttributeDescriptors()) { ClassDescriptor cld = desc.getClassDescriptor(); table.addRow(new String[] {desc.getName(), terseClass(desc.getType()), (cld == this ? "" : "from " + terseClass(cld.getName()))});