Class AbstractReflection.AbstractBuilder<B extends AbstractReflection.AbstractBuilder<B>>

java.lang.Object
org.apache.commons.lang3.builder.AbstractReflection.AbstractBuilder<B>
Type Parameters:
B - An AbstractBuilder subclass.
All Implemented Interfaces:
Supplier<AbstractReflection>
Direct Known Subclasses:
CompareToBuilder.Builder, EqualsBuilder.Builder, HashCodeBuilder.Builder, ReflectionDiffBuilder.Builder, ToStringBuilder.Builder
Enclosing class:
AbstractReflection

public abstract static class AbstractReflection.AbstractBuilder<B extends AbstractReflection.AbstractBuilder<B>> extends Object implements Supplier<AbstractReflection>
Builds an instance of a subclass of AbstractReflection.
Since:
3.21.0
  • Method Details

    • asThis

      protected B asThis()
      Returns this instance typed as its subclass.
      Returns:
      this instance typed as its subclass.
    • setForceAccessible

      public B setForceAccessible(boolean forceAccessible)
      Sets whether inaccessible fields are made accessible by calling AccessibleObject#setAccessible(true).

      In general, controls whether the instances built by this builder will force the accessible flag for reflection.

      Defaults to getForceAccessible(), which defaults to true for compatibility.

      This default is read from the system property "AbstractReflection.forceAccessible", which defaults to true for compatibility.

      The parsing rules are defined by Boolean.parseBoolean(String).

      See subclasses for specific behavior.

      Parameters:
      forceAccessible - Whether to force accessibility by calling AccessibleObject#setAccessible(true).
      Returns:
      this instance.
      See Also: