public MethodArgumentPanel(String id, final Argument arg) {
super(id);
add(new Label("index", String.format("Argument #%d", arg.getIndex())));
Class<?> type = arg.getType();
if (type.isPrimitive() || type.isEnum() || hasStringOnlyConstructor(type)) {
Builder builder = AttributeDefinition.builder(new PassThroughStringLocalizer());
MethodUtil.addEnumValues(type, builder);
builder.id("value").name("value");
if (type.equals(boolean.class) || type.equals(Boolean.class)) {
builder.asBoolean();
}