Java 类com.google.protobuf.DescriptorProtos.OneofDescriptorProto 实例源码

项目:play-store-api    文件:Descriptors.java   
private OneofDescriptor(final OneofDescriptorProto proto,
                        final FileDescriptor file,
                        final Descriptor parent,
                        final int index)
                 throws DescriptorValidationException {
  this.proto = proto;
  fullName = computeFullName(file, parent, proto.getName());
  this.file = file;
  this.index = index;

  containingType = parent;
  fieldCount = 0;
}
项目:Beam    文件:Descriptors.java   
private OneofDescriptor (final OneofDescriptorProto proto,
        final FileDescriptor file,
        final Descriptor parent,
        final int index)
        throws DescriptorValidationException {
    this.proto = proto;
    fullName = computeFullName (file, parent, proto.getName ());
    this.file = file;
    this.index = index;

    containingType = parent;
    fieldCount = 0;
}
项目:protobuf-el    文件:ProtoFileParser.java   
@Override
public void exitOneofStatement(final OneofStatementContext ctx) {
  final OneofDescriptorProto.Builder oneofBuilder =
      OneofDescriptorProto.Builder.class.cast(scopes.getProtoBuilder());
  oneofBuilder.setName(ctx.identifier().getText());
  scopes.popScope();
  scopes.verifyOneofName(oneofBuilder);
}
项目:protobuf-el    文件:Scopes.java   
public void verifyOneofName(final OneofDescriptorProto.Builder oneof) {
  if (currentScope instanceof MessageScope) {
    final MessageScope scope = (MessageScope) currentScope;

    if (!scope.verifyOneofNameUnique(oneof.getName())) {
      contextLookup.reportNonUniqueOneofNameError(oneof, false);
    }
  }
}
项目:api-compiler    文件:Oneof.java   
public static Oneof create(ProtoContainerElement parent, OneofDescriptorProto proto,
    String path) {
  return new Oneof(parent, proto, path);
}
项目:api-compiler    文件:Oneof.java   
private Oneof(ProtoContainerElement parent, OneofDescriptorProto proto, String path) {
  super(parent, proto.getName(), path);
  this.proto = proto;
}
项目:play-store-api    文件:Descriptors.java   
private void setProto(final OneofDescriptorProto proto) {
  this.proto = proto;
}
项目:protobuf-el    文件:Scopes.java   
public OneofDescriptorProto.Builder addOneOf() {
  final OneofDescriptorProto.Builder builder = currentScope.addOneof();
  pushScope(new OneofScope(builder, (MessageScope) currentScope));
  return builder;
}
项目:protobuf-el    文件:Scopes.java   
protected OneofDescriptorProto.Builder addOneof() {
  throw new RuntimeException(NOT_APPLICABLE_IN_CURRENT_SCOPE);
}
项目:protobuf-el    文件:Scopes.java   
@Override
protected OneofDescriptorProto.Builder addOneof() {
  return protoBuilder.addOneofDeclBuilder();
}
项目:protobuf-el    文件:Scopes.java   
private OneofScope(final OneofDescriptorProto.Builder protoBuilder,
    final Scope<DescriptorProto.Builder> parent) {
  super(protoBuilder, parent);
  oneofIndex = parent.getProtoBuilder().getOneofDeclCount() - 1;
}