Package org.javers.core.metamodel.type
Class CustomType<T>
java.lang.Object
org.javers.core.metamodel.type.JaversType
org.javers.core.metamodel.type.CustomType<T>
- Type Parameters:
T- Custom Type
- All Implemented Interfaces:
CustomComparableType
Custom Types are not easy to manage, use it as a last resort,
only for corner cases like comparing custom Collection types.
JaVers treats a Custom Type as a black box and doesn't take any assumptions about its content or behaviour. It's a "not modeled" type, somehow similar to unbounded wildcard
Objects of Custom Type are compared by a
Custom Types are serialized to JSON using Gson defaults.
only for corner cases like comparing custom Collection types.
JaVers treats a Custom Type as a black box and doesn't take any assumptions about its content or behaviour. It's a "not modeled" type, somehow similar to unbounded wildcard
<?>.
Objects of Custom Type are compared by a
CustomPropertyComparator.
Registering this comparator is the only way to map a Custom Type.
Custom Types are serialized to JSON using Gson defaults.
-
Field Summary
Fields inherited from class org.javers.core.metamodel.type.JaversType
DEFAULT_TYPE_PARAMETER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanUsed for comparing as Valuesprotected TypeType for JSON representation.booleanbooleanisInstance(Object cdo) valueToString(Object value) Methods inherited from class org.javers.core.metamodel.type.JaversType
buildListOfConcreteTypeArguments, equals, getBaseJavaType, getConcreteClassTypeArguments, getName, hashCode, isGenericType, prettyPrint, prettyPrintBuilder, spawnConstructorArgs, spawnConstructorArgTypes, toString
-
Constructor Details
-
CustomType
-
-
Method Details
-
equals
Description copied from class:JaversTypeUsed for comparing as Values- Overrides:
equalsin classJaversType
-
hasCustomValueComparator
public boolean hasCustomValueComparator()- Specified by:
hasCustomValueComparatorin interfaceCustomComparableType
-
valueToString
- Specified by:
valueToStringin interfaceCustomComparableType
-
canBePrototype
public boolean canBePrototype()- Specified by:
canBePrototypein classJaversType
-
isInstance
- Specified by:
isInstancein classJaversType
-
getRawDehydratedType
Type for JSON representation. For Values it's simply baseJavaType. For ManagedTypes (references to Entities and ValueObjects) it's GlobalId because JaVers serializes references in the 'dehydrated' form. -
getBaseJavaClass
-