Class KotlinPropertyDeclaration.Builder<T extends KotlinPropertyDeclaration.Builder<T>>

java.lang.Object
io.spring.initializr.generator.language.kotlin.KotlinPropertyDeclaration.Builder<T>
Type Parameters:
T - a KotlinPropertyDeclaration.Builder subclass.
Direct Known Subclasses:
KotlinPropertyDeclaration.ValBuilder, KotlinPropertyDeclaration.VarBuilder
Enclosing class:
KotlinPropertyDeclaration

public abstract static class KotlinPropertyDeclaration.Builder<T extends KotlinPropertyDeclaration.Builder<T>> extends Object
Builder for creating a KotlinPropertyDeclaration.
  • Method Details

    • self

      protected abstract T self()
      Returns this instance.
      Returns:
      this instance
    • getter

      Returns the getter.
      Returns:
      the getter
    • setter

      Returns the setter.
      Returns:
      setter
    • returning

      public T returning(String returnType)
      Sets the return type.
      Parameters:
      returnType - the return type
      Returns:
      this for method chaining
    • modifiers

      public T modifiers(KotlinModifier... modifiers)
      Sets the modifiers.
      Parameters:
      modifiers - the modifiers
      Returns:
      this for method chaining
    • emptyValue

      public KotlinPropertyDeclaration emptyValue()
      Sets no value.
      Returns:
      the property declaration
    • value

      public KotlinPropertyDeclaration value(CodeBlock valueCode)
      Sets the given value.
      Parameters:
      valueCode - the code for the value
      Returns:
      the property declaration