test_class.file: persistence/src/test/java/org/devgateway/toolkit/persistence/excel/info/ClassFieldsExcelImportTest.java
test_class.identifier: ClassFieldsExcelImportTest
test_case.body: @Test
      public void getFields() throws Exception {
          final String[] expectedFields = {"id", "label"};
  
          final ClassFields classFields = new ClassFieldsExcelImport(
                  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 @ExcelImport fields", expectedFields, actualFields.toArray());
      }
test_case.class_method_signature: ClassFieldsExcelImportTest.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: original
focal_class.modifier: private final
focal_class.original_string: private final ClassFields original;
focal_class.type: ClassFields
focal_class.var_name: original
focal_class.file: persistence/src/main/java/org/devgateway/toolkit/persistence/excel/info/ClassFieldsExcelImport.java
focal_class.identifier: ClassFieldsExcelImport
focal_class.interfaces: implements ClassFields
focal_class.class_method_signature: ClassFieldsExcelImport.ClassFieldsExcelImport(final ClassFields classFields)
focal_class.full_signature: public  ClassFieldsExcelImport(final ClassFields classFields)
focal_class.identifier: ClassFieldsExcelImport
focal_class.modifiers: public
focal_class.parameters: (final ClassFields classFields)
focal_class.signature:  ClassFieldsExcelImport(final ClassFields classFields)
focal_class.class_method_signature: ClassFieldsExcelImport.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: ClassFieldsExcelImport.filterByClass(final Field field)
focal_class.full_signature: private boolean filterByClass(final Field field)
focal_class.identifier: filterByClass
focal_class.modifiers: private
focal_class.parameters: (final Field field)
focal_class.return: boolean
focal_class.signature: boolean filterByClass(final Field field)
focal_class.class_method_signature: ClassFieldsExcelImport.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_method.body: @Override
      public Iterator<Field> getFields() {
          final Iterable<Field> originalFields = () -> this.original.getFields();
  
          // return only classes that are annotated with @ExcelImport
          final Iterator<Field> fields = StreamSupport.stream(originalFields.spliterator(), false)
                  .filter(field -> field.getAnnotation(ExcelImport.class) != null)
                  .filter(this::filterByClass)
                  .iterator();
  
          return fields;
      }
focal_method.class_method_signature: ClassFieldsExcelImport.getFields()
focal_method.full_signature: @Override public Iterator<Field> getFields()
focal_method.identifier: getFields
focal_method.invocations: getFields iterator filter filter stream spliterator getAnnotation
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Iterator<Field>
focal_method.signature: Iterator<Field> getFields()