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 Summary
Modifier and TypeMethodDescriptionprotected BasThis()Returnsthisinstance typed as its subclass.setForceAccessible(boolean forceAccessible) Sets whether inaccessible fields are made accessible by callingAccessibleObject#setAccessible(true).
-
Method Details
-
asThis
-
setForceAccessible
Sets whether inaccessible fields are made accessible by callingAccessibleObject#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 callingAccessibleObject#setAccessible(true).- Returns:
thisinstance.- See Also:
-