@Test public void mapsTable() { final BapiMapping mapping = mapper.mapBapi(TestBapiClass.class); final Set<TableMapping> tableParams = mapping.getTableParameters(); assertThat(tableParams).hasSize(1); final TableMapping tableMapping = tableParams.iterator().next(); assertThat(tableMapping.getAssociatedType().getName()).isEqualTo(TestBapiStructureSubClass.class.getName()); }
public BapiMapping mapBapi(final Class<?> clazz) { assertIsBapiClass(clazz); Bapi bapiAnnotation = clazz.getAnnotation(BAPI); BapiMapping bapiMapping = new BapiMapping(clazz, bapiAnnotation.value(), getErrorHandling(clazz)); Set<Field> fields = getDeclaredFieldsWithAnnotationRecursively(clazz, PARAMETER); for (Field field : fields) { addParameterToBapiMapping(bapiMapping, new BapiField(field)); } return bapiMapping; }
AnnotationBapiMapper { public BapiMapping mapBapi(final Class<?> clazz) { assertIsBapiClass(clazz); Bapi bapiAnnotation = clazz.getAnnotation(BAPI); BapiMapping bapiMapping = new BapiMapping(clazz, bapiAnnotation.value(), getErrorHandling(clazz)); Set<Field> fields = getDeclaredFieldsWithAnnotationRecursively(clazz, PARAMETER); for (Field field : fields) { addParameterToBapiMapping(bapiMapping, new BapiField(field)); } return bapiMapping; } }
AnnotationBapiMapper { public BapiMapping mapBapi(final Class<?> clazz) { assertIsBapiClass(clazz); Bapi bapiAnnotation = clazz.getAnnotation(BAPI); BapiMapping bapiMapping = new BapiMapping(clazz, bapiAnnotation.value(), getErrorHandling(clazz)); Set<Field> fields = getDeclaredFieldsWithAnnotationRecursively(clazz, PARAMETER); for (Field field : fields) { addParameterToBapiMapping(bapiMapping, new BapiField(field)); } return bapiMapping; }  }
AnnotationBapiMapper { public BapiMapping mapBapi(final Class<?> clazz) { assertIsBapiClass(clazz); Bapi bapiAnnotation = clazz.getAnnotation(BAPI); BapiMapping bapiMapping = new BapiMapping(clazz, bapiAnnotation.value(), getErrorHandling(clazz)); Set<Field> fields = getDeclaredFieldsWithAnnotationRecursively(clazz, PARAMETER); for (Field field : fields) { addParameterToBapiMapping(bapiMapping, new BapiField(field)); } return bapiMapping; }  BapiMapping mapBapi(final Class<?> clazz); }
AnnotationBapiMapper { public BapiMapping mapBapi(final Class<?> clazz) { assertIsBapiClass(clazz); Bapi bapiAnnotation = clazz.getAnnotation(BAPI); BapiMapping bapiMapping = new BapiMapping(clazz, bapiAnnotation.value(), getErrorHandling(clazz)); Set<Field> fields = getDeclaredFieldsWithAnnotationRecursively(clazz, PARAMETER); for (Field field : fields) { addParameterToBapiMapping(bapiMapping, new BapiField(field)); } return bapiMapping; }  BapiMapping mapBapi(final Class<?> clazz);  }