return clas.newInstance();
} 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));
}
} else {
vctx.addError("Class " + cname + " does not implement the required ClassDecorator interface",
new ProblemLocation(ctx));