if (parameters.length < 1) {
throw parametersMissing(context, "add");
}
try {
if (parameters.length == 1) {
Any param = parameters[0];
if (param instanceof AnyName) {
_name.addAll((Name)param.toObject());
} else {
_name.add(param.toString());
}
} else {
int index = parameters[0].toInt();
if (index>=0 && index<=_name.size()) {
Any param = parameters[1];
if (param instanceof AnyName) {
_name.addAll(index, (Name)param.toObject());
} else {
_name.add(index, param.toString());
}
}
}
} catch (Exception e) {
throw context.exception(e);