public enum MethodFilter extends java.lang.Enum<MethodFilter>
| Modifier and Type | Class and Description |
|---|---|
private static interface |
MethodFilter.Filter |
| Enum Constant and Description |
|---|
ONLY_GETTERS
Rejects any method that returns
void or has a parameter list. |
ONLY_SETTERS
Rejects any method that doesn't accept a single parameter.
|
| Modifier and Type | Field and Description |
|---|---|
private MethodFilter.Filter |
filter |
| Modifier and Type | Method and Description |
|---|---|
boolean |
reject(java.lang.reflect.Method method)
Tests whether a method is not a getter or setter and should be rejected.
|
MethodDescriptor |
toDescriptor(java.lang.String prefix,
java.lang.reflect.Method method)
Creates a descriptor for a getter or setter method
|
static MethodFilter |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MethodFilter[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MethodFilter ONLY_GETTERS
void or has a parameter list.public static final MethodFilter ONLY_SETTERS
private MethodFilter.Filter filter
public static MethodFilter[] values()
for (MethodFilter c : MethodFilter.values()) System.out.println(c);
public static MethodFilter valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic boolean reject(java.lang.reflect.Method method)
method - the method to be testedtrue if the given method should be rejected, false otherwisepublic MethodDescriptor toDescriptor(java.lang.String prefix, java.lang.reflect.Method method)
prefix - a dot separated string denoting a path of nested object namesmethod - a actual class method to be associated with this prefix