Package org.javers.core.metamodel.type
Class OptionalType
java.lang.Object
org.javers.core.metamodel.type.JaversType
org.javers.core.metamodel.type.EnumerableType
org.javers.core.metamodel.type.ContainerType
org.javers.core.metamodel.type.CollectionType
org.javers.core.metamodel.type.OptionalType
-
Field Summary
Fields inherited from class org.javers.core.metamodel.type.JaversType
DEFAULT_TYPE_PARAMETER -
Constructor Summary
ConstructorsConstructorDescriptionOptionalType(Type baseJavaType, TypeMapperLazy typeMapperLazy) for TypeFactory.spawnFromPrototype()OptionalType(TypeMapperLazy typeMapperLazy) -
Method Summary
Modifier and TypeMethodDescriptionbooleanempty()Class<?>protected TypeType for JSON representation.booleanbooleanisInstance(Object cdo) Returns a new Enumerable (unmodifiable when possible) with items from sourceEnumerable mapped by mapFunction.map(Object sourceOptional_, EnumerableFunction mapFunction, OwnerContext owner) OwnerContext aware version ofEnumerableType.map(Object, EnumerableFunction, OwnerContext)Methods inherited from class org.javers.core.metamodel.type.CollectionType
map, mapToList, mapToSet, wrapNullMethods inherited from class org.javers.core.metamodel.type.ContainerType
getItemClass, getItemJavaType, getItemJaversTypeMethods inherited from class org.javers.core.metamodel.type.EnumerableType
filterToList, getConcreteClassTypeArguments, getTypeMapperLazy, mapPreservingSourceItemType, spawnConstructorArgs, spawnConstructorArgTypesMethods inherited from class org.javers.core.metamodel.type.JaversType
buildListOfConcreteTypeArguments, equals, equals, getBaseJavaType, getName, hashCode, isGenericType, prettyPrint, prettyPrintBuilder, toString
-
Constructor Details
-
OptionalType
for TypeFactory.spawnFromPrototype() -
OptionalType
-
-
Method Details
-
map
Description copied from class:EnumerableTypeOwnerContext aware version ofEnumerableType.map(Object, EnumerableFunction, OwnerContext)- Overrides:
mapin classCollectionType- Returns:
- immutable List
-
map
Description copied from class:EnumerableTypeReturns a new Enumerable (unmodifiable when possible) with items from sourceEnumerable mapped by mapFunction.- Overrides:
mapin classEnumerableType
-
items
- Overrides:
itemsin classCollectionType
-
isEmpty
- Overrides:
isEmptyin classCollectionType
-
empty
- Overrides:
emptyin classCollectionType
-
getEnumerableInterface
- Overrides:
getEnumerableInterfacein classCollectionType
-
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
-