@Test public void testGenericBuilder() { Type structType = new TypeToken<GenericStruct<String>>() {}.getType(); ThriftStructMetadataBuilder builder = new ThriftStructMetadataBuilder(new ThriftCatalog(), structType); builder.build(); }
@Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjections = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.STRUCT, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.of(constructorInjections), methodInjections ); }
ThriftStructMetadataBuilder extends AbstractThriftMetadataBuilder { @Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjections = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.STRUCT, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.of(constructorInjections), methodInjections ); } }
ThriftStructMetadataBuilder extends AbstractThriftMetadataBuilder { @Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjections = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.STRUCT, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.of(constructorInjections), methodInjections ); } ThriftStructMetadataBuilder(ThriftCatalog catalog, Type structType); }
ThriftStructMetadataBuilder extends AbstractThriftMetadataBuilder { @Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjections = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.STRUCT, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.of(constructorInjections), methodInjections ); } ThriftStructMetadataBuilder(ThriftCatalog catalog, Type structType); @Override ThriftStructMetadata build(); }
ThriftStructMetadataBuilder extends AbstractThriftMetadataBuilder { @Override public ThriftStructMetadata build() { metadataErrors.throwIfHasErrors(); ThriftMethodInjection builderMethodInjection = buildBuilderConstructorInjections(); ThriftConstructorInjection constructorInjections = buildConstructorInjection(); Iterable<ThriftFieldMetadata> fieldsMetadata = buildFieldInjections(); List<ThriftMethodInjection> methodInjections = buildMethodInjections(); return new ThriftStructMetadata( structName, extractStructIdlAnnotations(), structType, builderType, MetadataType.STRUCT, Optional.fromNullable(builderMethodInjection), ImmutableList.copyOf(documentation), ImmutableList.copyOf(fieldsMetadata), Optional.of(constructorInjections), methodInjections ); } ThriftStructMetadataBuilder(ThriftCatalog catalog, Type structType); @Override ThriftStructMetadata build();  }