public enum SetterStyle extends Enum<SetterStyle>
Note that introspection always starts by looking for getters first (see GetterStyle
).
Once a getter has been found, and if the entity is declared as mutable
, the mapper will try to find a matching setter: name inferred as described below,
exactly one argument matching the property type, and the return type does not matter.
PropertyStrategy
Enum Constant and Description |
---|
FLUENT
"Fluent" style: the method name must be the name of the property, without any prefix, for
example
int foo => foo(int) . |
JAVABEANS
"JavaBeans" style: the method name must start with "set", for example
int foo =>
setFoo(int) . |
Modifier and Type | Method and Description |
---|---|
static SetterStyle |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SetterStyle[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SetterStyle JAVABEANS
int foo =>
setFoo(int)
.public static final SetterStyle FLUENT
int foo => foo(int)
.public static SetterStyle[] values()
for (SetterStyle c : SetterStyle.values()) System.out.println(c);
public static SetterStyle valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2017–2022. All rights reserved.