@Test public void mapsChangingParameter() { final BapiMapping mapping = mapper.mapBapi(TestBapiClass.class); Set<ParameterMapping> changingParameters = mapping.getChangingParameters(); assertThat(changingParameters).extracting("associatedType").containsOnly(String.class); assertThat(changingParameters).extracting("javaName").containsOnly("changingParam"); assertThat(changingParameters).extracting("sapName").containsOnly("CHANGING_PARAM"); }
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);  }