JBBPMapper { @SafeVarargs public static <T> T map(final JBBPFieldStruct root, final String structPath, final T instance, final Function<Class<?>, Object>... instantiators) { return map(root, structPath, instance, null, instantiators); }  @SafeVarargs static T map(final JBBPFieldStruct root, final String structPath, final T instance, final Function<Class<?>, Object>... instantiators); @SafeVarargs static T map(final JBBPFieldStruct root, final String structPath, final T instance, final int flags, final Function<Class<?>, Object>... instantiators); @SafeVarargs static T map(final JBBPFieldStruct root, final String structPath, final T instance, final JBBPMapperCustomFieldProcessor customFieldProcessor, final Function<Class<?>, Object>... instantiators); @SafeVarargs static T map(final JBBPFieldStruct root, final String structPath, final T instance, final JBBPMapperCustomFieldProcessor customFieldProcessor, final int flags, final Function<Class<?>, Object>... instantiators); @SafeVarargs static T map(final JBBPFieldStruct root, final T instance, final Function<Class<?>, Object>... instantiators); @SafeVarargs static T map(final JBBPFieldStruct root, final T instance, final int flags, final Function<Class<?>, Object>... instantiators); @SafeVarargs static T map(final JBBPFieldStruct rootStructure, final T instance, final JBBPMapperCustomFieldProcessor customFieldProcessor, final Function<Class<?>, Object>... instantiators); @SafeVarargs @SuppressWarnings("varargs") static T map(final JBBPFieldStruct rootStructure, final T instance, final JBBPMapperCustomFieldProcessor customFieldProcessor, final int flags, final Function<Class<?>, Object>... instantiators); static int getFieldCacheSize(); static void clearFieldCache(); static List<MappedFieldRecord> findAffectedFields(final Object instance); static final String MAKE_CLASS_INSTANCE_METHOD_NAME; static final int FLAG_IGNORE_MISSING_VALUES; }
@Test void testMap_RootStructToClassWithNullCustomProcessor() throws Exception { class Mapped { @Bin byte a; } assertEquals(3, JBBPMapper.map(JBBPParser.prepare("byte a;").parse(new byte[] {3}), new Mapped()).a); }