[DEV] remove toStringList
This commit is contained in:
parent
a9b4d39fc0
commit
1c8ad846a3
@ -75,7 +75,6 @@ public abstract class IntrospectionModel {
|
||||
return false;
|
||||
}
|
||||
public abstract String toString(final Object data) throws ExmlBuilderException;
|
||||
public abstract String[] toStringList(final Object data);
|
||||
public boolean isEnum() {
|
||||
return this.classType.isEnum();
|
||||
}
|
||||
|
@ -67,9 +67,5 @@ public class IntrospectionModelArray extends IntrospectionModel {
|
||||
public String toString(final Object data) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public String[] toStringList(final Object data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,9 +43,5 @@ public class IntrospectionModelBaseType extends IntrospectionModel {
|
||||
public String toString(final Object data) {
|
||||
return StringSerializer.toString(data);
|
||||
}
|
||||
@Override
|
||||
public String[] toStringList(final Object data) {
|
||||
return StringSerializer.toStringList(data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -906,12 +906,6 @@ public class IntrospectionModelComplex extends IntrospectionModel {
|
||||
throw new ExmlBuilderException("Error in call 'toString()' for '" + this.classType.getCanonicalName() + "' " + e.getMessage());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String[] toStringList(final Object data) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class OrderData {
|
||||
|
@ -18,17 +18,16 @@ public class IntrospectionModelList extends IntrospectionModel {
|
||||
|
||||
@Override
|
||||
public Object createObject(final Map<String, Object> properties, final Map<String, List<Object>> nodes) throws ExmlBuilderException {
|
||||
if (nodeName == null) {
|
||||
if (this.nodeName == null) {
|
||||
return nodes.get(IntrospectionObject.STUPID_TOCKEN);
|
||||
} else {
|
||||
return nodes.get(nodeName);
|
||||
}
|
||||
return nodes.get(this.nodeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNodeAvaillable() {
|
||||
if (nodeName != null) {
|
||||
return Arrays.asList(nodeName);
|
||||
if (this.nodeName != null) {
|
||||
return Arrays.asList(this.nodeName);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -51,9 +50,5 @@ public class IntrospectionModelList extends IntrospectionModel {
|
||||
public String toString(final Object data) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public String[] toStringList(final Object data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -192,28 +192,14 @@ public class GeneratorIntrospection implements Generator {
|
||||
|
||||
public void generateNode(final Object data, final IntrospectionModel model, final String nodeName, final StringBuilder tmpp, final int indent) throws ExmlBuilderException {
|
||||
if (model.isNative()) {
|
||||
if (model.isList()) {
|
||||
String[] listDatas = model.toStringList(data);
|
||||
for (int iii=0; iii<listDatas.length; iii++) {
|
||||
Tools.addIndent(tmpp, indent);
|
||||
tmpp.append("<");
|
||||
tmpp.append(nodeName);
|
||||
tmpp.append(">");
|
||||
tmpp.append(listDatas[iii]);
|
||||
tmpp.append("</");
|
||||
tmpp.append(nodeName);
|
||||
tmpp.append(">");
|
||||
}
|
||||
} else {
|
||||
Tools.addIndent(tmpp, indent);
|
||||
tmpp.append("<");
|
||||
tmpp.append(nodeName);
|
||||
tmpp.append(">");
|
||||
tmpp.append(model.toString(data));
|
||||
tmpp.append("</");
|
||||
tmpp.append(nodeName);
|
||||
tmpp.append(">");
|
||||
}
|
||||
Tools.addIndent(tmpp, indent);
|
||||
tmpp.append("<");
|
||||
tmpp.append(nodeName);
|
||||
tmpp.append(">");
|
||||
tmpp.append(model.toString(data));
|
||||
tmpp.append("</");
|
||||
tmpp.append(nodeName);
|
||||
tmpp.append(">");
|
||||
} else if (model.isArray()) {
|
||||
List<String> baseName = model.getNodeAvaillable();
|
||||
IntrospectionModel introspectionSub = findOrCreate(ModelType.NORMAL, null, model.getClassType());
|
||||
|
Loading…
x
Reference in New Issue
Block a user