public class PojoMerge extends Object
Useful in cases where you want to define beans with 'default' values.
For example, given the following bean classes...
The getters will be called in order until the first non-null value is returned...
PojoMerge m;
m = PojoMerge.
callAllNonGetters
flag
passed into the constructor.
void
return type.
Constructor and Description |
---|
PojoMerge() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
merge(Class<T> interfaceClass,
boolean callAllNonGetters,
T... pojos)
Create a proxy interface on top of zero or more POJOs.
|
static <T> T |
merge(Class<T> interfaceClass,
T... pojos)
Create a proxy interface on top of zero or more POJOs.
|
public PojoMerge()
public static <T> T merge(Class<T> interfaceClass, T... pojos)
This is a shortcut to calling merge(interfaceClass,
interfaceClass
- The common interface class.pojos
- Zero or more POJOs to merge.
public static <T> T merge(Class<T> interfaceClass, boolean callAllNonGetters, T... pojos)
interfaceClass
- The common interface class.callAllNonGetters
- If pojos
- Zero or more POJOs to merge.
Copyright © 2018 Apache. All rights reserved.