/** * Map the structure fields to a class fields. * * @param <T> a class type * @param mappingClass a mapping class to be mapped by the structure fields, * must not be null and must have the default constructor * @param flags special flags to tune mapping * @return a mapped instance of the class, must not be null */ public <T> T mapTo(final Class<T> mappingClass, final int flags) { return mapTo(mappingClass, null, flags); }
/** * Map the structure fields to a class fields. * * @param <T> a class type * @param mappingClass a mapping class to be mapped by the structure fields, * must not be null and must have the default constructor * @return a mapped instance of the class, must not be null */ public <T> T mapTo(final Class<T> mappingClass) { return mapTo(mappingClass, null); }
/** * Map the structure fields to object fields. * * @param objectToMap an object to map fields of the structure, must not be * null * @return the same object from the arguments but with filled fields by values * of the structure */ public Object mapTo(final Object objectToMap) { return this.mapTo(objectToMap, null); }
/** * Map the structure fields to object fields. * * @param objectToMap an object to map fields of the structure, must not be * null * @param flags special flags to tune mapping process * @return the same object from the arguments but with filled fields by values * of the structure * @see JBBPMapper#FLAG_IGNORE_MISSING_VALUES * @since 1.1 */ public Object mapTo(final Object objectToMap, final int flags) { return this.mapTo(objectToMap, null, flags); }