public static enum Configuration.CircularReferenceMatchingMode extends Enum<Configuration.CircularReferenceMatchingMode>
CircularReferenceDetector
compares object instances. The default is EQUALITY_OPERATOR
and this should be
sufficient in mose cases. However, you may be dealing with an object model that returns copies of its
properties, instead of reusing the exact same instance. In this cases it would be easy to end up in
infinite loops, as the default circular reference detection would not be able to detect this. In those
cases you should switch to the EQUALS_METHOD
mode. The trade-off is, that this renders you unable
to nest equal but different objects.Enum Constant and Description |
---|
EQUALITY_OPERATOR
Compares objects using the
== operator. |
EQUALS_METHOD
Compares objects using Object.equals(Object).
|
Modifier and Type | Method and Description |
---|---|
static Configuration.CircularReferenceMatchingMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Configuration.CircularReferenceMatchingMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Configuration.CircularReferenceMatchingMode EQUALITY_OPERATOR
==
operator.public static final Configuration.CircularReferenceMatchingMode EQUALS_METHOD
public static Configuration.CircularReferenceMatchingMode[] values()
for (Configuration.CircularReferenceMatchingMode c : Configuration.CircularReferenceMatchingMode.values()) System.out.println(c);
public static Configuration.CircularReferenceMatchingMode 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 © 2013. All Rights Reserved.