@Test public void testNonFinalUnionOk() { ThriftUnionMetadataBuilder builder = new ThriftUnionMetadataBuilder(new ThriftCatalog(), NotFinalUnion.class); builder.build(); }
@Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjection = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.UNION, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.fromNullable(constructorInjection), methodInjections ); }
ThriftUnionMetadataBuilder extends AbstractThriftMetadataBuilder { @Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjection = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.UNION, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.fromNullable(constructorInjection), methodInjections ); } }
ThriftUnionMetadataBuilder extends AbstractThriftMetadataBuilder { @Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjection = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.UNION, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.fromNullable(constructorInjection), methodInjections ); } ThriftUnionMetadataBuilder(ThriftCatalog catalog, Type structType); }
ThriftUnionMetadataBuilder extends AbstractThriftMetadataBuilder { @Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjection = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.UNION, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.fromNullable(constructorInjection), methodInjections ); } ThriftUnionMetadataBuilder(ThriftCatalog catalog, Type structType); @Override ThriftStructMetadata build(); }
ThriftUnionMetadataBuilder extends AbstractThriftMetadataBuilder { @Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjection = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.UNION, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.fromNullable(constructorInjection), methodInjections ); } ThriftUnionMetadataBuilder(ThriftCatalog catalog, Type structType); @Override ThriftStructMetadata build();  }