Class FieldHint.Builder

java.lang.Object
org.springframework.aot.hint.FieldHint.Builder
Enclosing class:
FieldHint

public static class FieldHint.Builder extends Object
Builder for FieldHint.
  • Constructor Details

    • Builder

      public Builder(String name)
  • Method Details

    • allowWrite

      public FieldHint.Builder allowWrite(boolean allowWrite)
      Specify if setting the value of the field should be allowed.
      Parameters:
      allowWrite - true to allow Field.set(Object, Object)
      Returns:
      this, to facilitate method chaining
    • allowUnsafeAccess

      public FieldHint.Builder allowUnsafeAccess(boolean allowUnsafeAccess)
      Specify if using Unsafe on the field should be allowed.
      Parameters:
      allowUnsafeAccess - true to allow unsafe access
      Returns:
      this, to facilitate method chaining
    • build

      public FieldHint build()
      Create a FieldHint based on the state of this builder.
      Returns:
      a field hint