public final class VisibilityFilter extends Object
// will filter nothing : new VisibilityFilter(); // exclude only private and transient: new VisibilityFilter(Modifier.TRANSIENT, Modifier.PRIVATE); // exclude only public!! and allow all the rest new VisibilityFilter(Modifier.public);So the idea is to pass to the constructor all the Modifier.XXX modifiers that you want to be filtered.
BeanMutatorAccessorResolver.StandardMutaAccessorResolver
Modifier and Type | Field and Description |
---|---|
static VisibilityFilter |
ABSTRACT |
static VisibilityFilter |
ALL |
static VisibilityFilter |
NONE |
static VisibilityFilter |
PACKAGE_PUBLIC |
static VisibilityFilter |
PRIVATE |
static VisibilityFilter |
PROTECTED |
Constructor and Description |
---|
VisibilityFilter(int... modifier)
Creates a new VisibilityFilter with specified modifiers.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isVisible(int modifiers) |
boolean |
isVisible(Member member)
Checks whether this member is visible or not according to this filter.
|
public static final VisibilityFilter ABSTRACT
public static final VisibilityFilter PRIVATE
public static final VisibilityFilter ALL
public static final VisibilityFilter NONE
public static final VisibilityFilter PROTECTED
public static final VisibilityFilter PACKAGE_PUBLIC
public VisibilityFilter(int... modifier)
modifier
- all the modifiers you want to exclude.public final boolean isVisible(Member member)
member
- public final boolean isVisible(int modifiers)
Copyright © 2019. All rights reserved.