Class ValueDescriptorFactory
java.lang.Object
de.xima.fc.workflow.processor.value.ValueDescriptorFactory
- All Implemented Interfaces:
IValueDescriptorFactory,Serializable
@Immutable
public final class ValueDescriptorFactory
extends Object
implements IValueDescriptorFactory, Serializable
Default implementation of the
IValueDescriptorFactory.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<?>accessAtPath(Object base, String path) Access a nested property in an object at a given JSON path.constantBuilder(boolean value) constantBuilder(double value) constantBuilder(long value) constantBuilder(String value) static IValueDescriptorFactory<V> IListValueDescriptorBuilder<V>listBuilder(IValueDescriptor<V, ? extends IValueBuilder<V>> descriptor) <V> IListValueDescriptorBuilder<V>listBuilder(IValueDescriptorCreator<V> elementType) <V> IMapValueDescriptorBuilder<V>mapBuilder(IValueDescriptor<V, ? extends IValueBuilder<V>> descriptor) <V> IMapValueDescriptorBuilder<V>mapBuilder(IValueDescriptorCreator<V> elementType) <D> IUnionValueDescriptorBuilder<D>unionBuilder(Class<D> discriminatorClass) voidish()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.xima.fc.interfaces.workflow.value.IValueDescriptorFactory
any, bool, bool, bool, constant, constant, constant, constant, floating, floating, floating, integer, integer, integer, largeString, largeString, largeString, list, list, listOfLargeStrings, listOfLargeStrings, listOfStrings, listOfStrings, map, map, mapToLargeStrings, mapToLargeStrings, mapToStrings, mapToStrings, nullish, nullish, string, string, string, tuple, tuple, tupleOfSame, tupleOfSame, unionEmpty, unionEnumBuilder, unionOfEnumConst, unionOfEnumConst, unionOfEnumConstBuilder, unionOfEnumConstBuilder, unionOfStringConst, unionOfStringConst, unionOfStringConst, unionOfStringConstBuilder, unionOfStringConstBuilder, unionOfStringConstBuilder, unionStringBuilder
-
Constructor Details
-
ValueDescriptorFactory
public ValueDescriptorFactory()
-
-
Method Details
-
accessAtPath
Description copied from interface:IValueDescriptorFactoryAccess a nested property in an object at a given JSON path.- Specified by:
accessAtPathin interfaceIValueDescriptorFactory- Parameters:
base- Base object with data to access.path- JSON path to the data to access.- Returns:
- The data at the given path in the base object.
-
anyBuilder
- Specified by:
anyBuilderin interfaceIValueDescriptorFactory- Returns:
- A descriptor builder for an any value.
-
boolBuilder
- Specified by:
boolBuilderin interfaceIValueDescriptorFactory- Returns:
- A descriptor builder for a boolean value.
-
constantBuilder
- Specified by:
constantBuilderin interfaceIValueDescriptorFactory- Parameters:
value- The constant value that the descriptor should allow.- Returns:
- A descriptor builder for a boolean value that only admits a constant instance.
-
constantBuilder
- Specified by:
constantBuilderin interfaceIValueDescriptorFactory- Parameters:
value- The constant value that the descriptor should allow.- Returns:
- A descriptor builder for a floating point value that only admits a constant instance.
-
constantBuilder
- Specified by:
constantBuilderin interfaceIValueDescriptorFactory- Parameters:
value- The constant value that the descriptor should allow.- Returns:
- A descriptor builder for an integer value that only admits a constant instance.
-
constantBuilder
- Specified by:
constantBuilderin interfaceIValueDescriptorFactory- Parameters:
value- The constant value that the descriptor should allow.- Returns:
- A descriptor builder for a string value that only admits a constant instance.
-
floatingBuilder
- Specified by:
floatingBuilderin interfaceIValueDescriptorFactory- Returns:
- A descriptor builder for a floating point value.
-
integerBuilder
- Specified by:
integerBuilderin interfaceIValueDescriptorFactory- Returns:
- A descriptor builder for an integer value.
-
largeStringBuilder
- Specified by:
largeStringBuilderin interfaceIValueDescriptorFactory- Returns:
- A descriptor builder for a large string value.
-
listBuilder
public <V> IListValueDescriptorBuilder<V> listBuilder(IValueDescriptor<V, ? extends IValueBuilder<V>> descriptor) - Specified by:
listBuilderin interfaceIValueDescriptorFactory- Type Parameters:
V- Type of the elements contained in the list.- Parameters:
descriptor- Descriptor for the elements contained in the list.- Returns:
- A descriptor builder for a list value (
List<V>).
-
listBuilder
- Specified by:
listBuilderin interfaceIValueDescriptorFactory- Type Parameters:
V- Type of the elements contained in the list.- Parameters:
elementType- Creates the descriptor for the type of the list elements.- Returns:
- A descriptor builder for a list value (
List<V>).
-
mapBuilder
public <V> IMapValueDescriptorBuilder<V> mapBuilder(IValueDescriptor<V, ? extends IValueBuilder<V>> descriptor) - Specified by:
mapBuilderin interfaceIValueDescriptorFactory- Type Parameters:
V- Type of the mapped values.- Parameters:
descriptor- Descriptor for the type of the mapped values.- Returns:
- A descriptor builder for a map value (
Map<String, V>).
-
mapBuilder
- Specified by:
mapBuilderin interfaceIValueDescriptorFactory- Type Parameters:
V- Type of the mapped values.- Parameters:
elementType- Creates the descriptor for the type of the mapped values.- Returns:
- A descriptor builder for a map value (
Map<String, V>).
-
nullishBuilder
- Specified by:
nullishBuilderin interfaceIValueDescriptorFactory- Returns:
- A descriptor builder for a value that can only be
null.
-
recordBuilder
- Specified by:
recordBuilderin interfaceIValueDescriptorFactory- Returns:
- A descriptor builder for a record value.
-
stringBuilder
- Specified by:
stringBuilderin interfaceIValueDescriptorFactory- Returns:
- A descriptor builder for a string value.
-
tupleBuilder
- Specified by:
tupleBuilderin interfaceIValueDescriptorFactory- Returns:
- A descriptor builder for a tuple value with a fixed length and where each element has the same type. Each tuple element defaults to the default value of the given descriptor.
-
unionBuilder
- Specified by:
unionBuilderin interfaceIValueDescriptorFactory- Type Parameters:
D- Type of the objects used to discriminate between the union members.- Parameters:
discriminatorClass- Class of the objects used to discriminate between the union members.- Returns:
- A descriptor builder for a union value that uses instances of the given type as discriminators.
-
voidish
- Specified by:
voidishin interfaceIValueDescriptorFactory- Returns:
- A value descriptor for a void result. This is valid only as a root value for the return value of a method.
-
getInstance
- Returns:
- The immutable instance of the factory.
-