Examples of TField


Examples of org.apache.thrift.protocol.TField

  }

  @Override
  public TField readFieldBegin() throws TException {
    assert (!inner);
    TField f = new TField("", ORDERED_TYPE, (short) -1);
    // slight hack to communicate to DynamicSerDe that the field ids are not
    // being set but things are ordered.
    return f;
  }
View Full Code Here

Examples of org.apache.thrift.protocol.TField

  @Override
  public TField readFieldBegin() throws TException {
    // slight hack to communicate to DynamicSerDe that the field ids are not
    // being set but things are ordered.
    f = new TField("", ORDERED_TYPE, (short) -1);
    return f;
  }
View Full Code Here

Examples of org.apache.thrift.protocol.TField

  public void testWrites() throws Exception {
    TMemoryBuffer trans = new TMemoryBuffer(1024);
    TCTLSeparatedProtocol prot = new TCTLSeparatedProtocol(trans, 1024);

    prot.writeStructBegin(new TStruct());
    prot.writeFieldBegin(new TField());
    prot.writeI32(100);
    prot.writeFieldEnd();

    prot.writeFieldBegin(new TField());
    prot.writeListBegin(new TList());
    prot.writeDouble(348.55);
    prot.writeDouble(234.22);
    prot.writeListEnd();
    prot.writeFieldEnd();

    prot.writeFieldBegin(new TField());
    prot.writeString("hello world!");
    prot.writeFieldEnd();

    prot.writeFieldBegin(new TField());
    prot.writeMapBegin(new TMap());
    prot.writeString("key1");
    prot.writeString("val1");
    prot.writeString("key2");
    prot.writeString("val2");
    prot.writeString("key3");
    prot.writeString("val3");
    prot.writeMapEnd();
    prot.writeFieldEnd();

    prot.writeFieldBegin(new TField());
    prot.writeListBegin(new TList());
    prot.writeString("elem1");
    prot.writeString("elem2");
    prot.writeListEnd();
    prot.writeFieldEnd();

    prot.writeFieldBegin(new TField());
    prot.writeString("bye!");
    prot.writeFieldEnd();

    prot.writeStructEnd();
    trans.flush();
View Full Code Here

Examples of org.apache.thrift.protocol.TField

    String testStr = "\"hello, world!\"";

    prot.writeStructBegin(new TStruct());

    prot.writeFieldBegin(new TField());
    prot.writeString(testStr);
    prot.writeFieldEnd();

    prot.writeFieldBegin(new TField());
    prot.writeListBegin(new TList());
    prot.writeString("elem1");
    prot.writeString("elem2");
    prot.writeListEnd();
    prot.writeFieldEnd();
View Full Code Here

Examples of org.jboss.forge.scaffold.plugins.meta.model.TField

      addBeanField(name, TClassType.getClass(type));
   }

   public void addBeanField(String name, TClassType type)
   {
      classType.getFields().add(new TField(classType, name, type, Modifier.PRIVATE | Modifier.FINAL));

      TMethod getterMethod = new TMethod(classType, RenderUtil.getGetterName(type, name), type, Modifier.PUBLIC);
      getterMethod.setMethodContents("return this." + name + ";\n");
      classType.getMethods().add(getterMethod);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.