public DynamicDescribedTypeEncoding(final TypeEncoding underlyingEncoding) {
   _underlyingEncoding = underlyingEncoding;
   _descriptorType = _encoder.getType(_descriptor).getEncoding(_descriptor);
   _constructorSize =
       1
           + _descriptorType.getConstructorSize()
           + _descriptorType.getValueSize(_descriptor)
           + _underlyingEncoding.getConstructorSize();
 }
 public void writeConstructor() {
   _encoder.writeRaw(EncodingCodes.DESCRIBED_TYPE_INDICATOR);
   _descriptorType.writeConstructor();
   _descriptorType.writeValue(_descriptor);
   _underlyingEncoding.writeConstructor();
 }
 public boolean encodesSuperset(final TypeEncoding encoding) {
   return (getType() == encoding.getType())
       && (_underlyingEncoding.encodesSuperset(
           ((DynamicDescribedTypeEncoding) encoding)._underlyingEncoding));
 }
 public void write(final DescribedType val) {
   TypeEncoding<DescribedType> encoding = getEncoding(val);
   encoding.writeConstructor();
   encoding.writeValue(val);
 }
 public boolean isFixedSizeVal() {
   return _underlyingEncoding.isFixedSizeVal();
 }
 public int getValueSize(final Object val) {
   return _underlyingEncoding.getValueSize(((DescribedType) val).getDescribed());
 }
 public void writeValue(final Object val) {
   _underlyingEncoding.writeValue(((DescribedType) val).getDescribed());
 }
Example #8
0
 public boolean encodesSuperset(final TypeEncoding<Decimal64> encoding) {
   return (getType() == encoding.getType());
 }
 public boolean encodesSuperset(final TypeEncoding<Symbol> encoding) {
   return (getType() == encoding.getType());
 }