Java 类com.google.protobuf.WireFormat.FieldType 实例源码

项目:cfapi    文件:GeneratedMessageLite.java   
/** For use by generated code only. */
public static <ContainingType extends MessageLite, Type>
    GeneratedExtension<ContainingType, Type>
        newSingularGeneratedExtension(
            final ContainingType containingTypeDefaultInstance,
            final Type defaultValue,
            final MessageLite messageDefaultInstance,
            final Internal.EnumLiteMap<?> enumTypeMap,
            final int number,
            final WireFormat.FieldType type,
            final Class singularType) {
  return new GeneratedExtension<ContainingType, Type>(
      containingTypeDefaultInstance,
      defaultValue,
      messageDefaultInstance,
      new ExtensionDescriptor(enumTypeMap, number, type,
                              false /* isRepeated */,
                              false /* isPacked */),
      singularType);
}
项目:cfapi    文件:GeneratedMessageLite.java   
/** For use by generated code only. */
public static <ContainingType extends MessageLite, Type>
    GeneratedExtension<ContainingType, Type>
        newRepeatedGeneratedExtension(
            final ContainingType containingTypeDefaultInstance,
            final MessageLite messageDefaultInstance,
            final Internal.EnumLiteMap<?> enumTypeMap,
            final int number,
            final WireFormat.FieldType type,
            final boolean isPacked,
            final Class singularType) {
  @SuppressWarnings("unchecked")  // Subclasses ensure Type is a List
  Type emptyList = (Type) Collections.emptyList();
  return new GeneratedExtension<ContainingType, Type>(
      containingTypeDefaultInstance,
      emptyList,
      messageDefaultInstance,
      new ExtensionDescriptor(
          enumTypeMap, number, type, true /* isRepeated */, isPacked),
      singularType);
}
项目:cfapi    文件:GeneratedMessageLite.java   
/**
 * Create a new instance with the given parameters.
 *
 * The last parameter {@code singularType} is only needed for enum types.
 * We store integer values for enum types in a {@link ExtendableMessage}
 * and use Java reflection to convert an integer value back into a concrete
 * enum object.
 */
GeneratedExtension(
    final ContainingType containingTypeDefaultInstance,
    final Type defaultValue,
    final MessageLite messageDefaultInstance,
    final ExtensionDescriptor descriptor,
    final Class singularType) {
  // Defensive checks to verify the correct initialization order of
  // GeneratedExtensions and their related GeneratedMessages.
  if (containingTypeDefaultInstance == null) {
    throw new IllegalArgumentException(
        "Null containingTypeDefaultInstance");
  }
  if (descriptor.getLiteType() == WireFormat.FieldType.MESSAGE &&
      messageDefaultInstance == null) {
    throw new IllegalArgumentException(
        "Null messageDefaultInstance");
  }
  this.containingTypeDefaultInstance = containingTypeDefaultInstance;
  this.defaultValue = defaultValue;
  this.messageDefaultInstance = messageDefaultInstance;
  this.descriptor = descriptor;
}
项目:play-store-api    文件:GeneratedMessageLite.java   
/** For use by generated code only. */
public static <ContainingType extends MessageLite, Type>
    GeneratedExtension<ContainingType, Type>
        newSingularGeneratedExtension(
            final ContainingType containingTypeDefaultInstance,
            final Type defaultValue,
            final MessageLite messageDefaultInstance,
            final Internal.EnumLiteMap<?> enumTypeMap,
            final int number,
            final WireFormat.FieldType type,
            final Class singularType) {
  return new GeneratedExtension<ContainingType, Type>(
      containingTypeDefaultInstance,
      defaultValue,
      messageDefaultInstance,
      new ExtensionDescriptor(enumTypeMap, number, type,
                              false /* isRepeated */,
                              false /* isPacked */),
      singularType);
}
项目:play-store-api    文件:GeneratedMessageLite.java   
/** For use by generated code only. */
public static <ContainingType extends MessageLite, Type>
    GeneratedExtension<ContainingType, Type>
        newRepeatedGeneratedExtension(
            final ContainingType containingTypeDefaultInstance,
            final MessageLite messageDefaultInstance,
            final Internal.EnumLiteMap<?> enumTypeMap,
            final int number,
            final WireFormat.FieldType type,
            final boolean isPacked,
            final Class singularType) {
  @SuppressWarnings("unchecked")  // Subclasses ensure Type is a List
  Type emptyList = (Type) Collections.emptyList();
  return new GeneratedExtension<ContainingType, Type>(
      containingTypeDefaultInstance,
      emptyList,
      messageDefaultInstance,
      new ExtensionDescriptor(
          enumTypeMap, number, type, true /* isRepeated */, isPacked),
      singularType);
}
项目:play-store-api    文件:GeneratedMessageLite.java   
/**
 * Create a new instance with the given parameters.
 *
 * The last parameter {@code singularType} is only needed for enum types.
 * We store integer values for enum types in a {@link ExtendableMessage}
 * and use Java reflection to convert an integer value back into a concrete
 * enum object.
 */
GeneratedExtension(
    final ContainingType containingTypeDefaultInstance,
    final Type defaultValue,
    final MessageLite messageDefaultInstance,
    final ExtensionDescriptor descriptor,
    final Class singularType) {
  // Defensive checks to verify the correct initialization order of
  // GeneratedExtensions and their related GeneratedMessages.
  if (containingTypeDefaultInstance == null) {
    throw new IllegalArgumentException(
        "Null containingTypeDefaultInstance");
  }
  if (descriptor.getLiteType() == WireFormat.FieldType.MESSAGE &&
      messageDefaultInstance == null) {
    throw new IllegalArgumentException(
        "Null messageDefaultInstance");
  }
  this.containingTypeDefaultInstance = containingTypeDefaultInstance;
  this.defaultValue = defaultValue;
  this.messageDefaultInstance = messageDefaultInstance;
  this.descriptor = descriptor;
}
项目:bazel    文件:GeneratedMessageLite.java   
/** For use by generated code only. */
public static <ContainingType extends MessageLite, Type>
    GeneratedExtension<ContainingType, Type>
        newSingularGeneratedExtension(
            final ContainingType containingTypeDefaultInstance,
            final Type defaultValue,
            final MessageLite messageDefaultInstance,
            final Internal.EnumLiteMap<?> enumTypeMap,
            final int number,
            final WireFormat.FieldType type,
            final Class singularType) {
  return new GeneratedExtension<ContainingType, Type>(
      containingTypeDefaultInstance,
      defaultValue,
      messageDefaultInstance,
      new ExtensionDescriptor(enumTypeMap, number, type,
                              false /* isRepeated */,
                              false /* isPacked */),
      singularType);
}
项目:bazel    文件:GeneratedMessageLite.java   
/** For use by generated code only. */
public static <ContainingType extends MessageLite, Type>
    GeneratedExtension<ContainingType, Type>
        newRepeatedGeneratedExtension(
            final ContainingType containingTypeDefaultInstance,
            final MessageLite messageDefaultInstance,
            final Internal.EnumLiteMap<?> enumTypeMap,
            final int number,
            final WireFormat.FieldType type,
            final boolean isPacked,
            final Class singularType) {
  @SuppressWarnings("unchecked")  // Subclasses ensure Type is a List
  Type emptyList = (Type) Collections.emptyList();
  return new GeneratedExtension<ContainingType, Type>(
      containingTypeDefaultInstance,
      emptyList,
      messageDefaultInstance,
      new ExtensionDescriptor(
          enumTypeMap, number, type, true /* isRepeated */, isPacked),
      singularType);
}
项目:bazel    文件:GeneratedMessageLite.java   
/**
 * Create a new instance with the given parameters.
 *
 * The last parameter {@code singularType} is only needed for enum types.
 * We store integer values for enum types in a {@link ExtendableMessage}
 * and use Java reflection to convert an integer value back into a concrete
 * enum object.
 */
GeneratedExtension(
    final ContainingType containingTypeDefaultInstance,
    final Type defaultValue,
    final MessageLite messageDefaultInstance,
    final ExtensionDescriptor descriptor,
    final Class singularType) {
  // Defensive checks to verify the correct initialization order of
  // GeneratedExtensions and their related GeneratedMessages.
  if (containingTypeDefaultInstance == null) {
    throw new IllegalArgumentException(
        "Null containingTypeDefaultInstance");
  }
  if (descriptor.getLiteType() == WireFormat.FieldType.MESSAGE &&
      messageDefaultInstance == null) {
    throw new IllegalArgumentException(
        "Null messageDefaultInstance");
  }
  this.containingTypeDefaultInstance = containingTypeDefaultInstance;
  this.defaultValue = defaultValue;
  this.messageDefaultInstance = messageDefaultInstance;
  this.descriptor = descriptor;
}
项目:cfapi    文件:GeneratedMessageLite.java   
ExtensionDescriptor(
    final Internal.EnumLiteMap<?> enumTypeMap,
    final int number,
    final WireFormat.FieldType type,
    final boolean isRepeated,
    final boolean isPacked) {
  this.enumTypeMap = enumTypeMap;
  this.number = number;
  this.type = type;
  this.isRepeated = isRepeated;
  this.isPacked = isPacked;
}
项目:play-store-api    文件:GeneratedMessageLite.java   
ExtensionDescriptor(
    final Internal.EnumLiteMap<?> enumTypeMap,
    final int number,
    final WireFormat.FieldType type,
    final boolean isRepeated,
    final boolean isPacked) {
  this.enumTypeMap = enumTypeMap;
  this.number = number;
  this.type = type;
  this.isRepeated = isRepeated;
  this.isPacked = isPacked;
}
项目:bazel    文件:GeneratedMessageLite.java   
ExtensionDescriptor(
    final Internal.EnumLiteMap<?> enumTypeMap,
    final int number,
    final WireFormat.FieldType type,
    final boolean isRepeated,
    final boolean isPacked) {
  this.enumTypeMap = enumTypeMap;
  this.number = number;
  this.type = type;
  this.isRepeated = isRepeated;
  this.isPacked = isPacked;
}
项目:cfapi    文件:GeneratedMessageLite.java   
public WireFormat.FieldType getLiteType() {
  return type;
}
项目:cfapi    文件:GeneratedMessageLite.java   
public FieldType getLiteType() {
  return descriptor.getLiteType();
}
项目:play-store-api    文件:GeneratedMessageLite.java   
@Override
public WireFormat.FieldType getLiteType() {
  return type;
}
项目:play-store-api    文件:GeneratedMessageLite.java   
@Override
public FieldType getLiteType() {
  return descriptor.getLiteType();
}
项目:bazel    文件:GeneratedMessageLite.java   
@Override
public WireFormat.FieldType getLiteType() {
  return type;
}
项目:bazel    文件:GeneratedMessageLite.java   
@Override
public FieldType getLiteType() {
  return descriptor.getLiteType();
}