@Test(expected = IllegalArgumentException.class) public void addImplementsTypeIllegalArgumentTest() { CodegenGeneratedTypeBuilder generatedTypeBuilder = new CodegenGeneratedTypeBuilder( JavaTypeName.create("my.package", "MyName")); generatedTypeBuilder.addImplementsType(Types.typeForClass(Serializable.class)); generatedTypeBuilder.addImplementsType(Types.typeForClass(Serializable.class)); }
@Override public T addImplementsType(final Type genType) { checkArgument(genType != null, "Type cannot be null"); checkArgument(!implementsTypes.contains(genType), "This generated type already contains equal implements type."); this.implementsTypes = LazyCollections.lazyAdd(this.implementsTypes, genType); return thisInstance(); }
AbstractGeneratedTypeBuilder extends AbstractBaseType implements GeneratedTypeBuilderBase<T> { @Override public T addImplementsType(final Type genType) { checkArgument(genType != null, "Type cannot be null"); checkArgument(!implementsTypes.contains(genType), "This generated type already contains equal implements type."); this.implementsTypes = LazyCollections.lazyAdd(this.implementsTypes, genType); return thisInstance(); } }
AbstractGeneratedTypeBuilder extends AbstractBaseType implements GeneratedTypeBuilderBase<T> { @Override public T addImplementsType(final Type genType) { checkArgument(genType != null, "Type cannot be null"); checkArgument(!implementsTypes.contains(genType), "This generated type already contains equal implements type."); this.implementsTypes = LazyCollections.lazyAdd(this.implementsTypes, genType); return thisInstance(); } protected  AbstractGeneratedTypeBuilder(final JavaTypeName identifier); }
AbstractGeneratedTypeBuilder extends AbstractBaseType implements GeneratedTypeBuilderBase<T> { @Override public T addImplementsType(final Type genType) { checkArgument(genType != null, "Type cannot be null"); checkArgument(!implementsTypes.contains(genType), "This generated type already contains equal implements type."); this.implementsTypes = LazyCollections.lazyAdd(this.implementsTypes, genType); return thisInstance(); } protected  AbstractGeneratedTypeBuilder(final JavaTypeName identifier); @Override boolean isAbstract(); @Override List<Type> getImplementsTypes(); @Override List<MethodSignatureBuilder> getMethodDefinitions(); @Override GeneratedTOBuilder addEnclosingTransferObject(final String name); @Override T addEnclosingTransferObject(final GeneratedTOBuilder genTOBuilder); @Override T addComment(final TypeComment newComment); @Override AnnotationTypeBuilder addAnnotation(final JavaTypeName identifier); @Override T setAbstract(final boolean newIsAbstract); @Override T addImplementsType(final Type genType); @Override Constant addConstant(final Type type, final String name, final Object value); boolean containsConstant(final String name); @Override EnumBuilder addEnumeration(final String name); @Override MethodSignatureBuilder addMethod(final String name); @Override boolean containsMethod(final String name); @Override GeneratedPropertyBuilder addProperty(final String name); @Override boolean containsProperty(final String name); Type getParent(); @Override List<GeneratedPropertyBuilder> getProperties(); @Override Optional<YangSourceDefinition> getYangSourceDefinition(); @Override void setYangSourceDefinition(final YangSourceDefinition definition); }
AbstractGeneratedTypeBuilder extends AbstractBaseType implements GeneratedTypeBuilderBase<T> { @Override public T addImplementsType(final Type genType) { checkArgument(genType != null, "Type cannot be null"); checkArgument(!implementsTypes.contains(genType), "This generated type already contains equal implements type."); this.implementsTypes = LazyCollections.lazyAdd(this.implementsTypes, genType); return thisInstance(); } protected  AbstractGeneratedTypeBuilder(final JavaTypeName identifier); @Override boolean isAbstract(); @Override List<Type> getImplementsTypes(); @Override List<MethodSignatureBuilder> getMethodDefinitions(); @Override GeneratedTOBuilder addEnclosingTransferObject(final String name); @Override T addEnclosingTransferObject(final GeneratedTOBuilder genTOBuilder); @Override T addComment(final TypeComment newComment); @Override AnnotationTypeBuilder addAnnotation(final JavaTypeName identifier); @Override T setAbstract(final boolean newIsAbstract); @Override T addImplementsType(final Type genType); @Override Constant addConstant(final Type type, final String name, final Object value); boolean containsConstant(final String name); @Override EnumBuilder addEnumeration(final String name); @Override MethodSignatureBuilder addMethod(final String name); @Override boolean containsMethod(final String name); @Override GeneratedPropertyBuilder addProperty(final String name); @Override boolean containsProperty(final String name); Type getParent(); @Override List<GeneratedPropertyBuilder> getProperties(); @Override Optional<YangSourceDefinition> getYangSourceDefinition(); @Override void setYangSourceDefinition(final YangSourceDefinition definition);  }