Package org.javers.core.metamodel.type
Class EnumerableType
java.lang.Object
org.javers.core.metamodel.type.JaversType
org.javers.core.metamodel.type.EnumerableType
- Direct Known Subclasses:
ContainerType,KeyValueType
Collection or Array or Map
-
Field Summary
Fields inherited from class org.javers.core.metamodel.type.JaversType
DEFAULT_TYPE_PARAMETER -
Method Summary
Modifier and TypeMethodDescriptionbooleanabstract Objectempty()<T> List<T>filterToList(Object source, Class<T> filter) Returns a new, unmodifiable Enumerable with filtered items, nulls are omitted.For generic types, returns a list of actual Class arguments.abstract Class<?>protected TypeType for JSON representation.protected TypeMapperLazyabstract booleanbooleanisInstance(Object cdo) Returns a new Enumerable (unmodifiable when possible) with items from sourceEnumerable mapped by mapFunction.abstract Objectabstract Objectmap(Object sourceEnumerable, EnumerableFunction mapFunction, OwnerContext owner) OwnerContext aware version ofmap(Object, EnumerableFunction, OwnerContext)mapPreservingSourceItemType(Object sourceEnumerable, Function mapFunction) For building Shadows.protected Object[]spawnConstructorArgs(Type baseJavaType) protected Class[]Methods inherited from class org.javers.core.metamodel.type.JaversType
buildListOfConcreteTypeArguments, equals, equals, getBaseJavaType, getName, hashCode, isGenericType, prettyPrint, prettyPrintBuilder, toString
-
Method Details
-
getConcreteClassTypeArguments
Description copied from class:JaversTypeFor generic types, returns a list of actual Class arguments. For example, for Set<String>, returns String. Non-concrete (like ?) or missing type arguments like are defaulted to Object.
For array, returns List withClass.getComponentType()- Overrides:
getConcreteClassTypeArgumentsin classJaversType
-
spawnConstructorArgs
- Overrides:
spawnConstructorArgsin classJaversType
-
spawnConstructorArgTypes
- Overrides:
spawnConstructorArgTypesin classJaversType
-
getTypeMapperLazy
-
map
public abstract Object map(Object sourceEnumerable, EnumerableFunction mapFunction, OwnerContext owner) OwnerContext aware version ofmap(Object, EnumerableFunction, OwnerContext)- Returns:
- immutable Enumerable
-
getEnumerableInterface
-
map
Returns a new Enumerable (unmodifiable when possible) with items from sourceEnumerable mapped by mapFunction. -
mapPreservingSourceItemType
For building Shadows. Item type of new enumerable matters only for arrays -
map
-
isEmpty
-
empty
-
filterToList
Returns a new, unmodifiable Enumerable with filtered items, nulls are omitted. -
items
-
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
-