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());
 }
示例#8
0
 public boolean encodesSuperset(final TypeEncoding<Decimal64> encoding) {
   return (getType() == encoding.getType());
 }
示例#9
0
 public boolean encodesSuperset(final TypeEncoding<Symbol> encoding) {
   return (getType() == encoding.getType());
 }