Examples of findValueByNumber()


Examples of com.google.protobuf.Descriptors.EnumDescriptor.findValueByNumber()

          case ENUM:
            final EnumDescriptor enumType = field.getEnumType();

            if (tokenizer.lookingAtInteger()) {
              final int number = tokenizer.consumeInt32();
              value = enumType.findValueByNumber(number);
              if (value == null) {
                throw tokenizer.parseExceptionPreviousToken(
                  "Enum type \"" + enumType.getFullName() +
                  "\" has no value with number " + number + '.');
              }
View Full Code Here

Examples of com.google.protobuf.Descriptors.EnumDescriptor.findValueByNumber()

        case ENUM:
          final EnumDescriptor enumType = field.getEnumType();

          if (tokenizer.lookingAtInteger()) {
            final int number = tokenizer.consumeInt32();
            value = enumType.findValueByNumber(number);
            if (value == null) {
              throw tokenizer.parseExceptionPreviousToken(
                "Enum type \"" + enumType.getFullName() +
                "\" has no value with number " + number + '.');
            }
View Full Code Here

Examples of com.google.protobuf.Descriptors.EnumDescriptor.findValueByNumber()

        case ENUM: {
          EnumDescriptor enumType = field.getEnumType();

          if (tokenizer.lookingAtInteger()) {
            int number = tokenizer.consumeInt32();
            value = enumType.findValueByNumber(number);
            if (value == null) {
              throw tokenizer.parseExceptionPreviousToken(
                "Enum type \"" + enumType.getFullName() +
                "\" has no value with number " + number + ".");
            }
View Full Code Here

Examples of com.google.protobuf.Descriptors.EnumDescriptor.findValueByNumber()

          case ENUM:
            final EnumDescriptor enumType = field.getEnumType();

            if (tokenizer.lookingAtInteger()) {
              final int number = tokenizer.consumeInt32();
              value = enumType.findValueByNumber(number);
              if (value == null) {
                throw tokenizer.parseExceptionPreviousToken(
                  "Enum type \"" + enumType.getFullName() +
                  "\" has no value with number " + number + '.');
              }
View Full Code Here

Examples of org.infinispan.protostream.descriptors.EnumDescriptor.findValueByNumber()

         }
      } else if (field.getJavaType() == JavaType.ENUM) {
         EnumDescriptor enumType = field.getEnumDescriptor();
         EnumValueDescriptor enumValue;
         try {
            enumValue = enumType.findValueByNumber(Integer.parseInt(value));
         } catch (NumberFormatException e) {
            enumValue = enumType.findValueByName(value);
         }
         if (enumValue == null) {
            throw log.getInvalidEnumLiteralException(value, enumType.getFullName());
View Full Code Here

Examples of org.infinispan.protostream.descriptors.EnumDescriptor.findValueByNumber()

         }
      } else if (field.getJavaType() == JavaType.ENUM) {
         EnumDescriptor enumType = field.getEnumDescriptor();
         EnumValueDescriptor enumValue;
         try {
            enumValue = enumType.findValueByNumber(Integer.parseInt(value));
         } catch (NumberFormatException e) {
            enumValue = enumType.findValueByName(value);
         }
         if (enumValue == null) {
            throw log.getInvalidEnumLiteralException(value, enumType.getFullName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.