private FieldDefinition declareTypeField()
    {
        FieldDefinition typeField = new FieldDefinition(a(PRIVATE, FINAL), "type", type(ThriftType.class));
        classDefinition.addField(typeField);

        // add constructor parameter to initialize this field
        parameters.add(typeField, ThriftType.struct(metadata));

        return typeField;
    }
private FieldDefinition declareTypeField ( ) { FieldDefinition typeField = new FieldDefinition ( a ( PRIVATE , FINAL ) , "type" , type ( ThriftType . class ) ) ; classDefinition . addField ( typeField ) ; parameters . add ( typeField , ThriftType . struct ( metadata ) ) ; return typeField ; }
Declares the private ThriftType field type.