/** * Set name converter to be used. * * @param nconv * @param ictx */ private void setNameConverter(NameConverter nconv, IUnmarshallingContext ictx) { if (nconv != null) { if (m_nameConverter != null) { ValidationContext vctx = (ValidationContext)ictx.getUserContext(); vctx.addWarning("Repeated 'name-converter' element overrides previous setting", new ProblemLocation(ictx)); } m_nameConverter = nconv; } }
vctx.addError("Missing required 'class' attribute", new ProblemLocation(ctx)); } else { try { } catch (InstantiationException e) { vctx.addError("Error creating instance of class " + cname + ": " + e.getMessage(), new ProblemLocation(ctx)); } catch (IllegalAccessException e) { vctx.addError("Unable to access constructor for class " + cname + ": " + e.getMessage(), new ProblemLocation(ctx)); new ProblemLocation(ctx)); vctx.addError("Unable to find class " + cname + " in classpath", new ProblemLocation(ctx));
String cname = ctx.attributeText(null, "class", null); if (cname == null) { vctx.addError("Missing required 'class' attribute", new ProblemLocation(ctx)); } else { try { if (ClassDecorator.class.isAssignableFrom(clas)) { vctx.addError("Class " + cname + " does not implement the required IClassDecorator interface", new ProblemLocation(ictx)); } else { try { } catch (InstantiationException e) { vctx.addError("Error creating instance of class " + cname + ": " + e.getMessage(), new ProblemLocation(ictx)); } catch (IllegalAccessException e) { vctx.addError("Unable to access constructor for class " + cname + ": " + e.getMessage(), new ProblemLocation(ictx)); vctx.addError("Unable to find class " + cname + " in classpath", new ProblemLocation(ictx));
} catch (InvocationTargetException e) { vctx.addWarning("Failed passing existing name converter to constructor for class " + cname + ": " + e.getMessage(), new ProblemLocation(ctx)); new ProblemLocation(ctx)); } catch (IllegalAccessException e) { vctx.addError("Unable to access constructor for class " + cname + ": " + e.getMessage(), new ProblemLocation(ctx)); new ProblemLocation(ctx)); vctx.addError("Unable to find class " + cname + " in classpath", new ProblemLocation(ctx));
vctx.addError("Unknown namespaced attribute '" + name + "'", new ProblemLocation(ctx)); ReflectionUtilities.applyKeyValueMap(map, obj); } catch (IllegalArgumentException e) { vctx.addError(e.getMessage(), new ProblemLocation(ctx));
vctx.addFatal("No customizations allowed", new ProblemLocation(ictx)); vctx.addFatal("Unknown element", new ProblemLocation(ictx));