Class BeanStore.Builder

java.lang.Object
org.apache.juneau.cp.BeanStore.Builder
Enclosing class:
BeanStore

public static class BeanStore.Builder extends Object
Builder class.
  • Constructor Details

    • Builder

      protected Builder()
      Constructor.
  • Method Details

    • build

      public BeanStore build()
      Instantiates this bean store.
      Returns:
      A new bean store.
    • parent

      Specifies the parent bean store.

      Bean searches are performed recursively up this parent chain.

      Parameters:
      value - The setting value.
      Returns:
      This object.
    • readOnly

      Specifies that the bean store is read-only.

      This means methods such as BeanStore.addBean(Class, Object) cannot be used.

      Returns:
      This object.
    • threadSafe

      Specifies that the bean store being created should be thread-safe.
      Returns:
      This object.
    • outer

      public BeanStore.Builder outer(Object value)
      Specifies the outer bean context.

      The outer context bean to use when calling constructors on inner classes.

      Parameters:
      value - The outer bean context. Can be null.
      Returns:
      This object.
    • impl

      Overrides the bean to return from the build() method.
      Parameters:
      value - The bean to return from the build() method.
      Returns:
      This object.
    • type

      public BeanStore.Builder type(Class<? extends BeanStore> value)
      Overrides the bean store type.

      The specified type must have one of the following:

      • A static getInstance() method.
      • A public constructor that takes in this builder.
      • A protected constructor that takes in this builder.
      Parameters:
      value - The bean store type.
      Returns:
      This object.