@Test public void testSkipValue() { final DecoderImpl decoder = new DecoderImpl(); final EncoderImpl encoder = new EncoderImpl(decoder); AMQPDefinedTypes.registerAllTypes(decoder, encoder); final ByteBuffer buffer = ByteBuffer.allocate(64); decoder.setByteBuffer(buffer); encoder.setByteBuffer(buffer); encoder.writeUnsignedInteger(UnsignedInteger.ZERO); encoder.writeUnsignedInteger(UnsignedInteger.ONE); buffer.clear(); TypeConstructor<?> type = decoder.readConstructor(); assertEquals(UnsignedInteger.class, type.getTypeClass()); type.skipValue(); UnsignedInteger result = decoder.readUnsignedInteger(); assertEquals(UnsignedInteger.ONE, result); }
public Class<UnsignedInteger> getTypeClass() { return UnsignedInteger.class; }
UnsignedIntegerType extends AbstractPrimitiveType<UnsignedInteger> { public Class<UnsignedInteger> getTypeClass() { return UnsignedInteger.class; } }
UnsignedIntegerType extends AbstractPrimitiveType<UnsignedInteger> { public Class<UnsignedInteger> getTypeClass() { return UnsignedInteger.class; } UnsignedIntegerType(final EncoderImpl encoder, final DecoderImpl decoder); }
UnsignedIntegerType extends AbstractPrimitiveType<UnsignedInteger> { public Class<UnsignedInteger> getTypeClass() { return UnsignedInteger.class; } UnsignedIntegerType(final EncoderImpl encoder, final DecoderImpl decoder); Class<UnsignedInteger> getTypeClass(); UnsignedIntegerEncoding getEncoding(final UnsignedInteger val); void fastWrite(EncoderImpl encoder, UnsignedInteger value); UnsignedIntegerEncoding getCanonicalEncoding(); Collection<UnsignedIntegerEncoding> getAllEncodings(); }
UnsignedIntegerType extends AbstractPrimitiveType<UnsignedInteger> { public Class<UnsignedInteger> getTypeClass() { return UnsignedInteger.class; } UnsignedIntegerType(final EncoderImpl encoder, final DecoderImpl decoder); Class<UnsignedInteger> getTypeClass(); UnsignedIntegerEncoding getEncoding(final UnsignedInteger val); void fastWrite(EncoderImpl encoder, UnsignedInteger value); UnsignedIntegerEncoding getCanonicalEncoding(); Collection<UnsignedIntegerEncoding> getAllEncodings();  }