Uses of Annotation Type
org.instancio.documentation.ExperimentalApi
Packages that use ExperimentalApi
Package
Description
Instancio public-facing APIs; for usage examples see
Instancio.Contains classes related to generators.
Defines generator specs.
Defines classes that provide access to built-in generators.
Provides classes for overriding settings at runtime.
Defines Service Provider Interfaces for providing custom implementations.
-
Uses of ExperimentalApi in org.instancio
Classes in org.instancio with annotations of type ExperimentalApiModifier and TypeClassDescriptionfinal classA collection of static factory methods for creating assignments.interfaceAn assignment that can be passed to theInstancioApi.assign(Assignment...)method.interfaceProvides an API for generating the Cartesian product.final classClass for generating simple value types, such as strings, numbers, dates, and so on.interfaceRepresents an origin selector of a conditional assignment.interfaceRepresents an origin and a destination of a conditional assigment.interfaceDefines optional methods that can be chained toAssign.given(TargetSelector)builder expression.interfaceDefines methods one of which follow theAssign.given(TargetSelector)builder expressions to create an assignment.interfaceDefines optional methods that can be chained toAssign.given(TargetSelector, TargetSelector)builder expression.interfaceValue of a target selector of an assignment.interfaceAn assigment containing origin and destination selectors.interfaceAn assigment containing origin and destination selectors, and a predicate that the origin value must satisfy for the assignment to be applied.final classProvides convenience methods for creatingPredicates.Methods in org.instancio with annotations of type ExperimentalApiModifier and TypeMethodDescriptionCartesianProductApi.assign(Assignment... assignments) InstancioApi.assign(Assignment... assignments) Restricts this selector's target(s) to a depth that satisfies the givenpredicate.DepthSelector.atDepth(int depth) Restricts this selector's target(s) to the specified depth.<V> CartesianProductApi<T> CartesianProductApi.generate(TargetSelector selector, GeneratorSpec<V> spec) <V> InstancioApi<T> InstancioApi.generate(TargetSelector selector, GeneratorSpec<V> spec) static <T> GivenOriginCreates a conditional assignment for a givenorigintype.static <T,R> GivenOrigin Assign.given(GetMethodSelector<T, R> origin) Creates a conditional assignment for a givenoriginmethod reference and one or moredestinationselectors.static GivenOriginAssign.given(TargetSelector origin) Creates a conditional for a givenoriginand one or moredestinationselectors.static GivenOriginDestinationAssign.given(TargetSelector origin, TargetSelector destination) Creates a conditional assigment for a given pair oforiginanddestinationselectors.static NumericSequenceSpec<Integer> Gen.intSeq()GeneratesIntegersequences.static <T> Predicate<T> When.is(T value) A predicate that returnstrueif values are equal usingObjects.equals(Object, Object).static <T> Predicate<T> When.isIn(T... values) A predicate that checks whether a value is equal to any element in thevaluesarray usingObjects.equals(Object, Object).static <T> Predicate<T> When.isNot(T value) A predicate that returnstrueif values are not equal usingObjects.equals(Object, Object).static <T> Predicate<T> When.isNotNull()A predicate that checks if a value is notnull.static <T> Predicate<T> When.isNull()A predicate that checks if a value isnull.CartesianProductApi.list()Returns he Cartesian product generated from values specified via theCartesianProductApi.with(TargetSelector, Object[])method as a list.static NumericSequenceSpec<Long> Gen.longSeq()GeneratesLongsequences.static <T> CartesianProductApi<T> Instancio.ofCartesianProduct(Class<T> type) Generates the Cartesian product based on the values specified via thewith()method.static <T> CartesianProductApi<T> Instancio.ofCartesianProduct(Model<T> model) Generates the Cartesian product based on the values specified via thewith()method.static <T> CartesianProductApi<T> Instancio.ofCartesianProduct(TypeTokenSupplier<T> typeToken) Generates the Cartesian product based on the values specified via thewith()method.static ScopeSelect.scope(PredicateSelector selector) Creates a scope from the given predicate selector.static SelectorSelects a setter method by name in the specified class.static SelectorSelects a setter method by name and parameter type in the specified class.static SelectorSelects a setter by name declared in the class being created.static <T,U> Selector Select.setter(SetMethodSelector<T, U> methodReference) Selects a setter method based on the given method reference.FieldSelectorBuilder.toScope()Scope representation of a selector.PredicateSelector.toScope()Scope representation of a selector.TypeSelectorBuilder.toScope()Scope representation of a selector.static <T> ValueOfCreates an assignment for a given targettype.static <T,R> ValueOf Assign.valueOf(GetMethodSelector<T, R> target) Creates an assignment for a giventargetmethod reference.static ValueOfAssign.valueOf(TargetSelector target) Creates an assignment builder with a giventargetselector.InstancioApi.verbose()<V> CartesianProductApi<T> CartesianProductApi.with(TargetSelector selector, V... values) Sets a range of values for generating the Cartesian product.Specifies the scope for this selector in order to narrow down its target.Specifies the scope for this selector in order to narrow down its target.Specifies the scope for this selector in order to narrow down its target. -
Uses of ExperimentalApi in org.instancio.generator
Methods in org.instancio.generator with annotations of type ExperimentalApiModifier and TypeMethodDescriptiondefault voidGenerator.init(GeneratorContext context) An optional method for generators that need to initialise state before generating values. -
Uses of ExperimentalApi in org.instancio.generator.specs
Classes in org.instancio.generator.specs with annotations of type ExperimentalApiModifier and TypeInterfaceDescriptioninterfaceGenerator spec for producing CSV.interfaceSpec for generating CSV.interfaceA generator spec that emits given items to a selector's target.interfaceNumericSequenceAsGeneratorSpec<T extends Number & Comparable<T>>A spec for generating numeric sequences that supportsAsGeneratorSpec.interfaceNumericSequenceGeneratorSpec<T extends Number & Comparable<T>>A spec for generating numeric sequences.interfaceNumericSequenceSpec<T extends Number & Comparable<T>>Spec for generating numeric sequences.Methods in org.instancio.generator.specs with annotations of type ExperimentalApiModifier and TypeMethodDescriptionPathGeneratorSpec.createDirectory()Terminal method to indicate that the generated path, including parent directories (if any), should be created as a directory in the file system.PathGeneratorSpec.createFile()Terminal method to indicate that the generated path, including parent directories (if any), should be created as a file in the file system.PathGeneratorSpec.createFile(InputStream content) Terminal method to indicate that the generated path, including parent directories (if any), should be created as a file in the file system and content provided by the input stream written to the file.BigDecimalAsGeneratorSpec.precision(int precision) Precision of the generatedBigDecimal.BigDecimalGeneratorSpec.precision(int precision) Precision of the generatedBigDecimal.BigDecimalSpec.precision(int precision) Precision of the generatedBigDecimal. -
Uses of ExperimentalApi in org.instancio.generators
Methods in org.instancio.generators with annotations of type ExperimentalApi -
Uses of ExperimentalApi in org.instancio.settings
Classes in org.instancio.settings with annotations of type ExperimentalApiModifier and TypeClassDescriptionenumA setting that specifies whether objects should be populated via fields or methods.enumA setting that specifies whether Bean Validation annotations are declared on fields or getters.final classA class containing modifier constants.enumA setting that specifies what should happen if an error occurs when setting a field's value.enumA setting that specifies what should happen if an error occurs during a setter method invocation.enumSpecifies the style of setter to use whenAssignmentType.METHODis enabled.static interfaceA builder for creating custom keys.Fields in org.instancio.settings with annotations of type ExperimentalApiModifier and TypeFieldDescriptionstatic final SettingKey<AssignmentType> Keys.ASSIGNMENT_TYPESpecifies whether to assign values using fields or methods; default isAssignmentType.FIELD; property nameassignment.type.static final SettingKey<Boolean> Specifies whether values should be generated based on Jakarta Bean Validation 3.0 annotations, if present; default isfalse; property namebean.validation.api.enabled.static final SettingKey<BeanValidationTarget> Specifies whether Bean Validation annotations are declared on fields or getters; default isBeanValidationTarget.FIELD; property namebean.validation.target.static final SettingKey<Integer> Keys.BIG_DECIMAL_SCALESpecifies thescalefor generatingBigDecimal; default is2; property namebigdecimal.scale.static final SettingKey<Boolean> Keys.FAIL_ON_ERRORSpecifies whether internal exceptions should be propagated up; default isfalse; property namefail.on.error.static final SettingKey<Boolean> Keys.JPA_ENABLEDSpecifies whether values should be generated based on JPA annotations, such as@Column.length; default isfalse; property namejpa.enabled.static final SettingKey<OnSetFieldError> Keys.ON_SET_FIELD_ERRORSpecifies what should happen if an error occurs setting a field's value; default isOnSetFieldError.IGNORE; property nameon.set.field.error.static final SettingKey<OnSetMethodError> Keys.ON_SET_METHOD_ERRORSpecifies what should happen if an error occurs invoking a setter; default isOnSetMethodError.ASSIGN_FIELD; property nameon.set.method.error.static final SettingKey<OnSetMethodNotFound> Specifies what should happen if a setter method for a field cannot be resolved; default isOnSetMethodNotFound.ASSIGN_FIELD; property nameon.set.method.not.found.static final SettingKey<OnSetMethodUnmatched> Specifies what should happen if a setter without a matching field is encountered; default isOnSetMethodUnmatched.IGNORE; property nameon.set.method.unmatched.static final SettingKey<Boolean> Keys.SET_BACK_REFERENCESSpecifies whether back references should be set for cyclic classes; default isfalse(cycles are terminated withnull); property nameset.back.references.static final SettingKey<Integer> Specifies modifier exclusions for setter-methods; default is0(no exclusions); property namesetter.exclude.modifier.static final SettingKey<SetterStyle> Keys.SETTER_STYLEIndicates the naming convention of setter methods to use; default isSetterStyle.SET; property namesetter.style.Methods in org.instancio.settings with annotations of type ExperimentalApiModifier and TypeMethodDescriptionstatic <T> SettingKey.SettingKeyBuilder<T> A builder for creating custom setting keys. -
Uses of ExperimentalApi in org.instancio.spi
Classes in org.instancio.spi with annotations of type ExperimentalApiModifier and TypeInterfaceDescriptionstatic interfaceResolves setter method based on a given node whenKeys.ASSIGNMENT_TYPEis set toAssignmentType.METHOD.interfaceProvides additional information toInstancioServiceProvider.Methods in org.instancio.spi with annotations of type ExperimentalApiModifier and TypeMethodDescriptionReturns the setter method for the givennode.InstancioServiceProvider.getSetterMethodResolver()Returns aSetterMethodResolverimplementation.default voidInstancioServiceProvider.init(ServiceProviderContext context) An optional method that can be used by implementations that require access to the context information.