/**
* method checks if class variable is "public" and not "public static final"
* and puts it into publicClassVariables if true.
*/
public boolean visit(VariableDeclarationFragment node) {
IVariableBinding binding = node.resolveBinding();
if (node.getParent().getNodeType() == 23) { // public class variables
String call = node.getParent().toString();
boolean isPublic = call.startsWith("public") && !call.startsWith("public static final") && !call.startsWith("public final static");
if (binding != null && isPublic) {
String key = binding.getDeclaringClass().getName() + "." + binding.getName();
List<String> value = new ArrayList<String>();
value.add(iCompUnit.getHandleIdentifier());
value.add(binding.getType().getName());
publicClassVariables.put(key, value);
}
}
return true;
}