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

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected B asThis()
      Returns this instance typed as its subclass.
      B setForceAccessible​(boolean forceAccessible)
      Sets whether inaccessible fields are made accessible by calling AccessibleObject#setAccessible(true).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Supplier

        get
    • Method Detail

      • 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:
        AccessibleObject.setAccessible(boolean)