Java Code Examples for io.protostuff.WireFormat.FieldType#UINT32

The following examples show how to use io.protostuff.WireFormat.FieldType#UINT32 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FieldTypeUtils.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static FieldType convert(io.protostuff.compiler.model.FieldType fieldType) {
  if (fieldType.isEnum()) {
    return FieldType.ENUM;
  }

  if (fieldType.isScalar()) {
    switch ((ScalarFieldType) fieldType) {
      case INT32:
        return FieldType.INT32;
      case INT64:
        return FieldType.INT64;
      case UINT32:
        return FieldType.UINT32;
      case UINT64:
        return FieldType.UINT64;
      case SINT32:
        return FieldType.SINT32;
      case SINT64:
        return FieldType.SINT64;
      case FIXED32:
        return FieldType.FIXED32;
      case FIXED64:
        return FieldType.FIXED64;
      case SFIXED32:
        return FieldType.SFIXED32;
      case SFIXED64:
        return FieldType.SFIXED64;
      case FLOAT:
        return FieldType.FLOAT;
      case DOUBLE:
        return FieldType.DOUBLE;
      case BOOL:
        return FieldType.BOOL;
      case STRING:
        return FieldType.STRING;
      case BYTES:
        return FieldType.BYTES;
      default:
        throw new IllegalStateException("bug: miss process of " + fieldType);
    }
  }

  if (fieldType.isMessage()) {
    return FieldType.MESSAGE;
  }

  throw new IllegalStateException("bug: miss process of " + fieldType);
}
 
Example 2
Source File: RuntimeUnsafeFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public FieldType getFieldType()
{
    return FieldType.UINT32;
}
 
Example 3
Source File: RuntimeUnsafeFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public FieldType getFieldType()
{
    return FieldType.UINT32;
}
 
Example 4
Source File: RuntimeUnsafeFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public FieldType getFieldType()
{
    return FieldType.UINT32;
}
 
Example 5
Source File: RuntimeReflectionFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public FieldType getFieldType()
{
    return FieldType.UINT32;
}
 
Example 6
Source File: RuntimeReflectionFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public FieldType getFieldType()
{
    return FieldType.UINT32;
}
 
Example 7
Source File: RuntimeReflectionFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public FieldType getFieldType()
{
    return FieldType.UINT32;
}
 
Example 8
Source File: SampleDelegates.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public FieldType getFieldType()
{
    return FieldType.UINT32;
}