public String getUsage() {
return " -Xdv : Initialize fields mapped from elements with their default values";
}
private boolean containsDefaultValue(Outline outline, FieldOutline field) {
ClassOutline fClass = null;
for (ClassOutline classOutline : outline.getClasses()) {
if (classOutline.implClass == field.getRawType()
&& !classOutline.implClass.isAbstract()) {
fClass = classOutline;
break;
}
}
if (fClass == null) {
return false;
}
for (FieldOutline f : fClass.getDeclaredFields()) {
if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
XSTerm term = particle.getTerm();
if (term.isElementDecl() && term.asElementDecl().getDefaultValue() != null) {
return true;