filterGetMethods(getMethods, readable, types);
filterIsMethods(isMethods, readable, types);
// iterate set* methods, checking overlap w/ readable
Iterator it = setMethods.iterator();
IMethod temp = null;
String name = ""; //$NON-NLS-1$
String type = ""; //$NON-NLS-1$
String[] encodedParams = null;
String returnType = ""; //$NON-NLS-1$
String param0 = ""; //$NON-NLS-1$
while (it.hasNext()) {
temp = (IMethod) it.next();
name = createPropertyNameFromMethod(temp);
// invalid naming convention
if (name == null)
continue;
returnType = getDecodedTypeName(temp.getReturnType());
// setter should have no return type
if (!returnType.equals("void")) //$NON-NLS-1$
continue;
// need to get type from parameter
encodedParams = temp.getParameterTypes();
if (encodedParams != null && encodedParams.length > 0) {
if (encodedParams.length > 1) {
// multiple params
param0 = getDecodedTypeName(encodedParams[0]);
if (!param0.equals("int")) //$NON-NLS-1$
// not a valid indexed property
continue;
type = getDecodedTypeName(encodedParams[1]);
}
else {
// one param, regular setter
if (isArray(encodedParams[0]))
type = getDecodedTypeName(encodedParams[0]);
}
}
if (readable.contains(name)) {
// writable and readable
if (!fRepeatMethods.contains(name)) {
descriptors.add(new JavaPropertyDescriptor(name, (String) types.get(name), true, true));
readable.remove(name);
fRepeatMethods.add(name);
}
}
else {
// wasn't readable, just writable
String[] params = temp.getParameterTypes();
// can't be setProperty if no parameters
if (!(params.length > 0))
continue;
if (!fRepeatMethods.contains(name)) {
type = getDecodedTypeName(params[0]);