} else if ("fields".equals(name)) {
if (value instanceof StringLiteral) {
fields = new String[] {value.constant.stringValue()};
} else if (value instanceof ArrayInitializer) {
ArrayInitializer init = (ArrayInitializer) value;
fields = new String[init.expressions == null ? 0
: init.expressions.length];
for (int i = 0, j = fields.length; i < j; i++) {
fields[i] = init.expressions[i].constant.stringValue();
}
}
} else if ("instantiable".equals(name)) {
instantiable = value.constant.booleanValue();
} else if ("methods".equals(name)) {
if (value instanceof StringLiteral) {
methods = new String[] {value.constant.stringValue()};
} else if (value instanceof ArrayInitializer) {
ArrayInitializer init = (ArrayInitializer) value;
methods = new String[init.expressions == null ? 0
: init.expressions.length];
for (int i = 0, j = methods.length; i < j; i++) {
methods[i] = init.expressions[i].constant.stringValue();
}