while (js.isInnerClass()) {
js = ((JavaInnerClass) js).getOuterClass();
}
JavaField[] fields = js.getFields();
JavaQName qName = JavaQNameImpl.getInstance(DatatypeConverterInterface.class);
JavaField converter = null;
for (int i = 0; i < fields.length; i++) {
if (qName.equals(fields[i].getType()) && JavaSource.DEFAULT_PROTECTION.equals(fields[i].getProtection()) &&
fields[i].isStatic() && fields[i].isFinal()) {
converter = fields[i];
break;
}
}
if (converter == null) {
converter = js.newJavaField("__dataTypeConverter", qName);
converter.setStatic(true);
converter.setFinal(true);
converter.addLine("new ", DatatypeConverterImpl.class, "()");
}
value = new Object[]{converter, ".parse" + getDatatypeName() + "(", pValue, ")"};
} else {
value = new Object[]{pData, ".getDatatypeConverter().parse" + getDatatypeName() + "(", pValue, ")"};
}