blob: d758c68b882127e761eb48cb4d03b2e7e27a101d [file] [log] [blame]
Mark Slee83c52a82006-06-07 06:51:18 +00001package com.facebook.thrift.protocol;
2
3import com.facebook.thrift.types.*;
4
5/**
6 * Helper class that encapsulates field metadata.
7 *
8 * @author Mark Slee <mcslee@facebook.com>
9 */
10public class TField {
11 public TField() {}
12
13 public TField(String n, TType t, int i) {
Mark Sleef3c322b2006-06-26 23:52:22 +000014 this(n, t, new Int32(i));
Mark Slee83c52a82006-06-07 06:51:18 +000015 }
16
Mark Sleef3c322b2006-06-26 23:52:22 +000017 public TField(String n, TType t, Int32 i) {
Mark Slee83c52a82006-06-07 06:51:18 +000018 name = n;
19 type = t;
20 id = i;
21 }
22
23 public String name = "";
24 public TType type = TType.STOP;
Mark Sleef3c322b2006-06-26 23:52:22 +000025 public Int32 id = new Int32();
Mark Slee83c52a82006-06-07 06:51:18 +000026}