AbstractReflection.AbstractBuilder
- public abstract static class org.apache.commons.lang3.builder.AbstractReflection.AbstractBuilder<B extends AbstractReflection.AbstractBuilder<B>> implements Supplier<AbstractReflection>[source]
Builds an instance of a subclass of
AbstractReflection.- Parameters:
<B> – An AbstractBuilder subclass.
Methods
Returns |
|
Sets whether inaccessible fields are made accessible by calling |
- @SuppressWarnings({"unchecked"}) protected B asThis()[source]
Returns
thisinstance typed as its subclass.- Returns:
thisinstance typed as its subclass.
- public B setForceAccessible(boolean forceAccessible)[source]
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:
thisinstance.- See also: