io.protostuff.Input.readEnum()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(8.4k)|赞(0)|评价(0)|浏览(211)

本文整理了Java中io.protostuff.Input.readEnum()方法的一些代码示例,展示了Input.readEnum()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Input.readEnum()方法的具体详情如下:
包路径:io.protostuff.Input
类名称:Input
方法名:readEnum

Input.readEnum介绍

[英]Reads an enum(its number) field value.
[中]读取枚举(其编号)字段值。

代码示例

代码示例来源:origin: protostuff/protostuff

@Override
public void mergeFrom(Input input, Foo message) throws IOException
  for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
        if (message.someEnum == null)
          message.someEnum = new ArrayList<EnumSample>();
        message.someEnum.add(EnumSample.valueOf(input.readEnum()));
        break;
      case 5:
        break;
      default:
        input.handleUnknownField(number, this);

代码示例来源:origin: protostuff/protostuff

@Override
public void mergeFrom(Input input, Bar message) throws IOException
  for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
        break;
      case 4:
        message.someEnum = Status.valueOf(input.readEnum());
        break;
      case 5:
        break;
      default:
        input.handleUnknownField(number, this);

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FragmentPriority message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.workloadClass = WorkloadClass.valueOf(input.readEnum());
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FieldTrim message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.trimType = TrimType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FieldSimpleConvertToType message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.dataType = DataType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FilterByType message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.type = DataType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FieldConvertFloatToInteger message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.rounding = IntegerConversionType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FilterConvertibleData message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.desiredType = DataType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FieldConvertCase message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.convertCase = ConvertCase.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, ConvertSupport message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.from = com.dremio.common.types.MinorType.valueOf(input.readEnum());
        break;
      case 2:
        message.to = com.dremio.common.types.MinorType.valueOf(input.readEnum());
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, QueryPriority message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.workloadClass = WorkloadClass.valueOf(input.readEnum());
        break;
      case 2:
        message.workloadType = WorkloadType.valueOf(input.readEnum());
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FieldConvertDateToNumber message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.format = NumberToDateFormat.valueOf(input.readEnum())
        ;
        break;
      case 2:
        message.convertType = DataType.valueOf(input.readEnum())
        ;
        break;
      case 3:
        message.desiredType = DataType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FieldConvertNumberToDate message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.format = NumberToDateFormat.valueOf(input.readEnum())
        ;
        break;
      case 2:
        message.desiredType = DataType.valueOf(input.readEnum())
        ;
        break;
      case 3:
        message.convertType = DataType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(io.protostuff.Input input, com.dremio.exec.proto.CoordExecRPC.FragmentPriority.Builder builder) throws java.io.IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        builder.setWorkloadClass(com.dremio.exec.proto.UserBitShared.WorkloadClass.valueOf(input.readEnum()));
        break;
      default:
        input.handleUnknownField(number, this);
    }
  }
}
public boolean isInitialized(com.dremio.exec.proto.CoordExecRPC.FragmentPriority.Builder builder)

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, ParentDatasetDescriptor message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        if(message.path == null)
          message.path = new ArrayList<String>();
        message.path.add(input.readString());break;
      case 2:
        message.type = com.dremio.service.namespace.dataset.proto.DatasetType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, ParentDatasetInfo message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        if(message.datasetPath == null)
          message.datasetPath = new ArrayList<String>();
        message.datasetPath.add(input.readString());break;
      case 2:
        message.type = com.dremio.service.namespace.dataset.proto.DatasetType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, ParentDatasetApiDescriptor message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        if(message.path == null)
          message.path = new ArrayList<String>();
        message.path.add(input.readString());break;
      case 2:
        message.type = com.dremio.service.namespace.dataset.proto.DatasetType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, LayoutMeasureField message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.name = input.readString();
        break;
      case 2:
        if(message.measureType == null)
          message.measureType = new ArrayList<MeasureType>();
        message.measureType.add(MeasureType.valueOf(input.readEnum()));
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, ReflectionMeasureField message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.name = input.readString();
        break;
      case 2:
        if(message.measureType == null)
          message.measureType = new ArrayList<MeasureType>();
        message.measureType.add(MeasureType.valueOf(input.readEnum()));
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

代码示例来源:origin: dremio/dremio-oss

public void mergeFrom(Input input, FilterValue message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        if(message.values == null)
          message.values = new ArrayList<String>();
        message.values.add(input.readString());break;
      case 2:
        message.dataType = DataType.valueOf(input.readEnum())
        ;
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

相关文章