Package etch.bindings.java.msg

Examples of etch.bindings.java.msg.StructValue


    {
      keysAndValues[index++] = me.getKey();
      keysAndValues[index++] = me.getValue();
    }
   
    StructValue struct = new StructValue( type, vf );
    struct.put( field, keysAndValues );
    return struct;
  }
View Full Code Here


    return new Date( (Long) struct.get( field ) );
  }

  public StructValue exportValue( ValueFactory vf, Object value )
  {
    StructValue struct = new StructValue( type, vf );
    struct.put( field, ((Date) value).getTime() );
    return struct;
  }
View Full Code Here

    }
  }

  private StructValue readStruct() throws IOException
  {
    StructValue sv = startStruct();
    readKeysAndValues( sv );
    endStruct( sv );
    return sv;
  }
View Full Code Here

  private StructValue startStruct() throws IOException
  {
    Type t = readType();
    int length = readLength();
   
    return new StructValue( t, vf, length );
  }
View Full Code Here

        writeBytes( ((String) value).getBytes( vf.getStringEncoding() ) );
        return;
     
      case TypeCode.CUSTOM:
      {
        StructValue struct = vf.exportCustomValue( value );
       
        if (struct == null)
          throw new UnsupportedOperationException( "unsupported type "+value.getClass() );
       
        writeStruct( struct );
View Full Code Here

 
  private final Field field;

  public StructValue exportValue( ValueFactory vf, Object value )
  {
    StructValue sv = new StructValue( type, vf );
    sv.put( field, value.toString() );
    return sv;
  }
View Full Code Here

   
    Type type = getCustomStructType( clss );
   
    if (type == null && clss == StructValue.class)
    {
      StructValue struct = (StructValue) value;
      type = struct.type();
    }
   
    if (type == null)
    {
      if (Throwable.class.isAssignableFrom( clss ))
View Full Code Here

    TagElement te = stack.peek();
    elementList.push( te.getChildren() );
   
    Integer id = te.getIntAttr( null, STRUCT_TYPE_ATTR );
    Type type = vf.getType( id );
    return new StructValue( type, vf );
  }
View Full Code Here

        break;
       
      case TypeCode.STRUCT:
      case TypeCode.CUSTOM:
      {
        StructValue struct = vf.exportCustomValue( value );
       
        if (struct == null)
          throw new UnsupportedOperationException( "unsupported type "+value.getClass() );
       
        te.setAttr( null, ELEMENT_TYPE_ATTR, CUSTOM_TYPE );
View Full Code Here

    {
      keysAndValues[index++] = me.getKey();
      keysAndValues[index++] = me.getValue();
    }
   
    StructValue struct = new StructValue( type, vf );
    struct.put( field, keysAndValues );
    return struct;
  }
View Full Code Here

TOP

Related Classes of etch.bindings.java.msg.StructValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.