if (value instanceof Boolean) {
result = (Boolean)value;
} else if (value instanceof String) {
result =Boolean.valueOf((String)value);
} else if (value != null ) {
throw new MissingParameterException("incompatible-parameter",
new String[] { name, "boolean", value.getClass().getName() });
} else {
throw new MissingParameterException("missing-parameter", name);
}
return result;
}