InvocationSite invocationSite,
Scope invocationScope,
boolean onlyStaticFields,
ObjectVector localsFound,
ObjectVector fieldsFound) {
ObjectVector newFieldsFound = new ObjectVector();
// Inherited fields which are hidden by subclasses are filtered out
// No visibility checks can be performed without the scope & invocationSite
next : for (int f = fields.length; --f >= 0;) {
FieldBinding field = fields[f];
if (field.isSynthetic()) continue next;
if (onlyStaticFields && !field.isStatic()) continue next;
if (!field.canBeSeenBy(receiverType, invocationSite, scope)) continue next;
for (int i = fieldsFound.size; --i >= 0;) {
FieldBinding otherField = (FieldBinding) fieldsFound.elementAt(i);
if (CharOperation.equals(field.name, otherField.name, true)) {
continue next;
}
}
for (int l = localsFound.size; --l >= 0;) {
LocalVariableBinding local = (LocalVariableBinding) localsFound.elementAt(l);
if (CharOperation.equals(field.name, local.name, true)) {
continue next;
}
}
newFieldsFound.add(field);
}
fieldsFound.addAll(newFieldsFound);
}