code: private void defineGetTypeMethod()
      {
          classDefinition.addMethod(
                  new MethodDefinition(a(PUBLIC), "getType", type(ThriftType.class))
                          .loadThis()
                          .getField(codecType, typeField)
                          .retObject()
          );
      }
docs: Defines the getType method which simply returns the value of the type field.