code: public static <T> T map(final JBBPFieldStruct root, final Class<T> mappingClass, final JBBPMapperCustomFieldProcessor customFieldProcessor, final int flags) {
      return mappingClass.cast(map(root, allocateMemoryForClass(root, mappingClass), customFieldProcessor, flags));
    }
docs: Create a class instance, map binary data of a structure to the instance and
  return it. It will create a class instance through a hack method and its
  constructor will not be called, thus use the method carefully.
  
  @param <T>                  the mapping class type
  @param root                 a parsed structure to be mapped to the class instance, must not
  be null
  @param mappingClass         the class to be instantiated and mapped, must not be
  null
  @param customFieldProcessor a custom field processor to provide custom
  values, it can be null if there is not any mapping field desires the
  processor
  @param flags                special flags to tune mapping process
  @return the created and mapped instance of the class
  @throws JBBPMapperException for any error
  @see #FLAG_IGNORE_MISSING_VALUES
  @since 1.1