Package etch.bindings.java.msg

Examples of etch.bindings.java.msg.Field


   * @param type
   * @param class2type
   */
  public static void init( Type type, Class2TypeMap class2type )
    {
    Field field = type.getField( FIELD_NAME );
   
    // quick lookup to serialize this class.
    class2type.put( HashMap.class, type );
   
    // type for arrays.
View Full Code Here


   * @param type
   * @param class2type
   */
  public static void init( Type type, Class2TypeMap class2type )
  {
    Field field = type.getField( FIELD_NAME );
    class2type.put( Date.class, type );
    type.setComponentType( Date.class );
    type.setImportExportHelper( new DateSerializer( type, field ) );
    type.putValidator( field, Validator_long.get( 0 ) );
    type.lock();
View Full Code Here

    throws IOException
  {
    Type t = sv.type();
    while (true)
    {
      Field key = readField( t );
      if (key == null)
        break;
     
      Validator v = t.getValidator( key );
      if (v != null)
View Full Code Here

      return null;
   
    if (obj instanceof Integer)
    {
      Integer id = (Integer) obj;
      Field field = type.getField( id );
     
      if (field == null)
        field = new Field( id, id.toString() );
     
      return field;
    }
   
    Assertion.check( obj instanceof String, "obj instanceof String" );
    String name = (String) obj;
    Field field = type.getField( name );
   
    if (field == null)
      field = new Field( name );
   
    return field;
  }
View Full Code Here

  private void writeKeysAndValues( StructValue sv ) throws IOException
  {
    Type t = sv.type();
    for (Map.Entry<Field, Object> me: sv)
    {
      Field f = me.getKey();
      writeField( f );
      writeValue( t.getValidator( f ), me.getValue() );
    }
  }
View Full Code Here

   * @param type
   * @param class2type
   */
  public static void init( Type type, Class2TypeMap class2type )
  {
    Field field = type.getField( FIELD_NAME );
    class2type.put( _Etch_RuntimeException.class, type );
    type.setComponentType( _Etch_RuntimeException.class );
    type.setImportExportHelper( new RuntimeExceptionSerializer( type, field ) );
    type.putValidator( field, Validator_string.get( 0 ) );
    type.lock();
View Full Code Here

    mt_response = new Type( "_Etch_PwAuthResp" );
   
    vf.addType( mt_request );
    vf.addType( mt_response );
   
    mf_user = new Field( "user" );
    mf_password = new Field( "password" );
    mf_ok = new Field( "ok" );
    mf_status = new Field( "status" );
   
    mt_request.putValidator( mf_user, Validator_string.get( 0 ) );
    mt_request.putValidator( mf_password, Validator_string.get( 0 ) );
    mt_request.setResult( mt_response );
    mt_request.lock();
View Full Code Here

   * @param type
   * @param class2type
   */
  public static void init( Type type, Class2TypeMap class2type )
    {
    Field field = type.getField( FIELD_NAME );
    class2type.put( StrStrHashMap.class, type );
    type.setComponentType( StrStrHashMap.class );
    type.setImportExportHelper( new StrStrHashMapSerializer( type, field ) );
    type.putValidator( field, Validator_object.get( 1 ) );
    type.lock();
View Full Code Here

   * @param type
   * @param class2type
   */
  public static void init( Type type, Class2TypeMap class2type )
    {
    Field field = type.getField( FIELD_NAME );
    class2type.put( ArrayList.class, type );
    type.setComponentType( List.class );
    type.setImportExportHelper( new ListSerializer( type, field ) );
    type.putValidator( field, Validator_object.get( 1 ) );
    type.lock();
View Full Code Here

   * @param type
   * @param class2type
   */
  public static void init( Type type, Class2TypeMap class2type )
    {
    Field field = type.getField( FIELD_NAME );
   
    class2type.put( HashSet.class, type );
    type.setComponentType( Set.class );
   
    type.setImportExportHelper( new SetSerializer( type, field ) );
View Full Code Here

TOP

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

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.