// All fields of the interfaces it implements.
Iterator<InterfaceType> interfaces = interfaces().iterator();
InterfaceType inter;
while (interfaces.hasNext()) {
inter = interfaces.next();
resultSet.addAll(inter.allFields());
}
// If it is a class, all fields of it's superclass.
if (this instanceof ClassType) {
ClassType superclass = ((ClassType) this).superclass();