JBBPFieldBit extends JBBPAbstractField implements JBBPNumericField, BitEntity { @Override public JBBPBitNumber getBitWidth() { return this.bitNumber; } JBBPFieldBit(final JBBPNamedFieldInfo name, final int value, final JBBPBitNumber bitNumber); static long reverseBits(final byte value, final JBBPBitNumber bits); @Override JBBPBitNumber getBitWidth(); @Override double getAsDouble(); @Override float getAsFloat(); @Override int getAsInt(); @Override long getAsLong(); @Override boolean getAsBool(); @Override long getAsInvertedBitOrder(); @Override String getTypeAsString();  }
@Test public void testNameField() { final JBBPFieldBit field = new JBBPFieldBit(new JBBPNamedFieldInfo("test.field", "field", 123), 123, JBBPBitNumber.BITS_4); final JBBPNamedFieldInfo namedField = field.getNameInfo(); assertEquals("test.field", namedField.getFieldPath()); assertEquals("field", namedField.getFieldName()); assertEquals(123, namedField.getFieldOffsetInCompiledBlock()); assertEquals(JBBPBitNumber.BITS_4, field.getBitWidth()); }