test_class.file: persistence/src/test/java/org/devgateway/toolkit/persistence/excel/info/ClassFieldsDefaultTest.java
test_class.identifier: ClassFieldsDefaultTest
test_case.body: @Test
      public void getFields() throws Exception {
          final String[] expectedFields = {"id", "label"};
  
          final ClassFields classFields = new ClassFieldsDefault(TestClass.class);
          final Iterator<Field> fields = classFields.getFields();
  
          final List<String> actualFields = new ArrayList<>();
          while (fields.hasNext()) {
              final Field f = fields.next();
              actualFields.add(f.getName());
          }
  
          Assert.assertArrayEquals("Check declared fields", expectedFields, actualFields.toArray());
      }
test_case.class_method_signature: ClassFieldsDefaultTest.getFields()
test_case.full_signature: @Test public void getFields()
test_case.identifier: getFields
test_case.invocations: getFields hasNext next add getName assertArrayEquals toArray
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getFields()
focal_class.declarator: clazz
focal_class.modifier: private final
focal_class.original_string: private final Class clazz;
focal_class.type: Class
focal_class.var_name: clazz
focal_class.declarator: getInheritedFields
focal_class.modifier: private final
focal_class.original_string: private final Boolean getInheritedFields;
focal_class.type: Boolean
focal_class.var_name: getInheritedFields
focal_class.declarator: declaredFields
focal_class.modifier: private
focal_class.original_string: private Field[] declaredFields;
focal_class.type: Field[]
focal_class.var_name: declaredFields
focal_class.file: persistence/src/main/java/org/devgateway/toolkit/persistence/excel/info/ClassFieldsDefault.java
focal_class.identifier: ClassFieldsDefault
focal_class.interfaces: implements ClassFields
focal_class.class_method_signature: ClassFieldsDefault.ClassFieldsDefault(final Class clazz, final Boolean getInheritedFields)
focal_class.full_signature: public  ClassFieldsDefault(final Class clazz, final Boolean getInheritedFields)
focal_class.identifier: ClassFieldsDefault
focal_class.modifiers: public
focal_class.parameters: (final Class clazz, final Boolean getInheritedFields)
focal_class.signature:  ClassFieldsDefault(final Class clazz, final Boolean getInheritedFields)
focal_class.class_method_signature: ClassFieldsDefault.ClassFieldsDefault(final Class clazz)
focal_class.full_signature: public  ClassFieldsDefault(final Class clazz)
focal_class.identifier: ClassFieldsDefault
focal_class.modifiers: public
focal_class.parameters: (final Class clazz)
focal_class.signature:  ClassFieldsDefault(final Class clazz)
focal_class.class_method_signature: ClassFieldsDefault.getFields()
focal_class.full_signature: @Override public Iterator<Field> getFields()
focal_class.identifier: getFields
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Iterator<Field>
focal_class.signature: Iterator<Field> getFields()
focal_class.class_method_signature: ClassFieldsDefault.getClazz()
focal_class.full_signature: @Override public Class getClazz()
focal_class.identifier: getClazz
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class
focal_class.signature: Class getClazz()
focal_class.class_method_signature: ClassFieldsDefault.getAllFields(final Class clazz)
focal_class.full_signature: private List<Field> getAllFields(final Class clazz)
focal_class.identifier: getAllFields
focal_class.modifiers: private
focal_class.parameters: (final Class clazz)
focal_class.return: List<Field>
focal_class.signature: List<Field> getAllFields(final Class clazz)
focal_method.body: @Override
      public Iterator<Field> getFields() {
          // cache declared fields of a class
          if (declaredFields == null) {
              if (getInheritedFields) {
                  declaredFields = getAllFields(clazz).toArray(new Field[getAllFields(clazz).size()]);
              } else {
                  declaredFields = clazz.getDeclaredFields();
              }
          }
  
          // filter some of the fields including this$0 used in inner classes
          final Iterator<Field> fields = Arrays.stream(declaredFields)
                  .filter(field -> !field.getName().equals("serialVersionUID"))
                  .filter(field -> !field.getName().equals("this$0"))
                  .iterator();
  
          return fields;
      }
focal_method.class_method_signature: ClassFieldsDefault.getFields()
focal_method.full_signature: @Override public Iterator<Field> getFields()
focal_method.identifier: getFields
focal_method.invocations: toArray getAllFields size getAllFields getDeclaredFields iterator filter filter stream equals getName equals getName
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Iterator<Field>
focal_method.signature: Iterator<Field> getFields()