Class FieldSetterEmitter<T>

  • All Implemented Interfaces:
    com.atlassian.bamboo.specs.api.codegen.CodeEmitter<T>
    Direct Known Subclasses:
    AuthenticationEmitter, BBCloudRepositorySlugEmitter, DockerConfigurationVolumesEmitter

    public class FieldSetterEmitter<T>
    extends java.lang.Object
    implements com.atlassian.bamboo.specs.api.codegen.CodeEmitter<T>
    Default code generator for any field of EntityProperties instance. Implementation should emit full method invocation statement, starting with ".methodName".
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String methodName  
    • Constructor Summary

      Constructors 
      Constructor Description
      FieldSetterEmitter​(java.lang.String methodName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull java.lang.String emitCode​(@NotNull com.atlassian.bamboo.specs.api.codegen.CodeGenerationContext context, T argument)
      Generates invocation of a setter method with a single argument.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • methodName

        protected final java.lang.String methodName
    • Constructor Detail

      • FieldSetterEmitter

        public FieldSetterEmitter​(java.lang.String methodName)
    • Method Detail

      • emitCode

        @NotNull
        public @NotNull java.lang.String emitCode​(@NotNull
                                                  @NotNull com.atlassian.bamboo.specs.api.codegen.CodeGenerationContext context,
                                                  @NotNull
                                                  T argument)
                                           throws com.atlassian.bamboo.specs.api.codegen.CodeGenerationException
        Generates invocation of a setter method with a single argument.
        Specified by:
        emitCode in interface com.atlassian.bamboo.specs.api.codegen.CodeEmitter<T>
        Throws:
        com.atlassian.bamboo.specs.api.codegen.CodeGenerationException