public String process() { if (this.type.getCanonicalName() == null) { new RuntimeException("" + this.type).printStackTrace(); } else { this.elem(Elem.mapping); if (this.abs) { this.attr("abstract", "true"); } else { this.attr("name", this.type.getSimpleName()) .attr("extends", this.type.getSuperclass().getCanonicalName()); } this.attr("class", this.type.getCanonicalName()); if (BindingGenerator.MSG_TYPE.isAssignableFrom(this.type.getSuperclass()) || BindingGenerator.DATA_TYPE.isAssignableFrom(this.type.getSuperclass())) { this.elem(Elem.structure) .attr("map-as", this.type.getSuperclass().getCanonicalName()) .end(); } for (Field f : type.getDeclaredFields()) { TypeBinding tb = getTypeBinding(f); if (!(tb instanceof NoopTypeBinding)) { System.out.printf( "BOUND: %-70s [type=%s:%s]\n", f.getDeclaringClass().getCanonicalName() + "." + f.getName(), tb.getTypeName(), f.getType().getCanonicalName()); this.append(tb.toString()); } } this.end(); } return this.toString(); }
@Override public String getTypeName() { return type.getTypeName(); }