Generator Catalog
Generator Catalog (Java)
The main entry point is io.github.frikit.krandom.generator.Generators. Most
locale-aware factories accept a Locale or GeneratorConfig; use a shared
GeneratorConfig when a fixture needs common locale, seed, clock, safety, or
registry settings. Factories with a long overload provide a locally seeded
generator where shown by the API.
Base, numeric, and algorithms
ofConstant,ofBoolean,ofNullableBoolean,ofChar,ofString,ofDigit,ofNumber,ofNumberWithFormat,ofRegex,ofPyDecimalofByte,ofShort,ofInt,ofNaturalNumber,ofLong,ofFloat,ofDouble,ofAtomicInteger,ofAtomicLong,ofBigDecimal,ofBigIntegerofNormal,ofPrime,ofFibonacci,ofLuhn,ofCoin,ofDice
Network and internet
ofIPv4,ofIPv6,ofIP,ofPort,ofMacAddressofDomain,ofHostname,ofUrl(text URL),ofUri(text URI),ofUriObject(URIobject),ofUrlObject(URLobject),ofSlug,ofUserAgent. Plain names generate text; the…Objectnames generate the corresponding JDK object.ofHttpMethod,ofHttpStatusCode,ofHttpFixture
Addresses and names are reserved fixture destinations by default; see the network contract.
Date, time, and locale
ofLocalDate,ofLocalTime,ofLocalDateTime,ofInstant,ofZonedDateTime,ofOffsetDateTime,ofOffsetTimeofDuration,ofPeriod,ofYear,ofYearMonth,ofMonthDay,ofZoneId,ofZoneOffset,ofTimezone(text),ofTimeZoneObject(TimeZoneobject),ofCalendarofUtilDate,ofSqlDate,ofSqlTime,ofSqlTimestamp,ofLocale
Drawn UTC offsets run from -12:00 to +14:00 in 15-minute steps; see the
UTC-offset contract.
ofInstant draws a UTC day and a time within it, to the millisecond; see the
Instant contract.
People, location, and profiles
ofFullName,ofMiddleName,ofEmail,ofUsername,ofPassword,ofAvatarUrl,ofContactInfo,ofSimpleProfile,ofProfileofStreetAddress,ofAddressInfo,ofAddressType(residential, commercial, …),ofAddressPurpose(home, billing, shipping, …),ofCity,ofState,ofPostalCode,ofCountry(names and ISO 3166-1 alpha-2, alpha-3 and numeric codes),ofPhoneNumber,ofGeohashofCompanyEmail,ofCompanyInfo,ofJobInfo,ofPersonInfo,ofSocialHandle,ofSocialProfileofUniversityfor configuration-scoped verified local data packsofProfession,ofIndustry,ofJobField,ofJobType,ofSeniority,ofPosition,ofEducationalAttainment,ofMaritalStatus,ofBloodType,ofPronoun,ofNationalityofZodiac,ofChineseZodiac,ofNatoPhonetic,ofHobby,ofProgrammingLanguage,ofMbti
Company, commerce, vehicle, and domain data
ofCompanyName,ofCompanyUrl,ofCompanyBuzzword,ofCompanyCatchPhraseofCommerce,ofProductInfo,ofOrderInfo,ofShipmentInfoofVin,ofVehicle,ofWeather,ofMeasurement,ofFinancialTerm,ofRestaurantTypeofAws,ofAzure,ofComputer,ofColor
Finance, identity, and identifiers
- Safe-by-default finance:
ofCurrency,ofCurrencyPair,ofMoney,ofCreditCard,ofCreditCardInfo,ofCardExpiration,ofInvoiceInfo,ofPaymentInfo - Banking (explicit policy required before generation):
ofBic,ofBban,ofIban,ofAbaRouting,ofBankAccount,ofBankInfo;ofBankCountry,ofBankName, andofBankTypeprovide descriptive bank data - Other fail-closed generators (explicit policy required):
ofIsin,ofCusip,ofEin,ofCnpj,ofCpf,ofCryptoAddress,ofNationalId,ofPassport,ofDrivingLicense - General identifiers:
ofUuid(the canonical UUID factory; no redundantofUUIDalias),ofHash,ofIdentifierMask,ofEan,ofUpc,ofIsbn
PaymentCardSafetyPolicy.TEST_SAFE_NON_ROUTABLE is the default for cards.
Banking, securities, business-tax, crypto-address, national-ID, and identity-document output is
disabled by default. Select the corresponding GeneratorConfig safety policy only for isolated
fixtures; see Finance and Identity and
Data Validity and Safety.
Files, text, templates, and system data
ofFileExtension,ofFileName,ofDirPath,ofFilePath,ofMimeType,ofSemver,ofVersion,ofPlatformId,ofDatabase,ofExceptionPayloadofLoremIpsum,ofWord,ofSyllable,ofSentence,ofParagraph,ofTextofTemplate,ofProviderTemplate,ofDataFakerExpression
Objects, schemas, and providers
ofObjectgenerates a type;ofObjectFakeradds targeted rules and exclusions through strings, Java method references, or nestedPropertyPathvalues.ObjectModelcaptures immutable, composable fixture definitions, and strict mode rejects unused explicit rules.ofFieldresolves provider keys;ofSchemagenerates batches and exports them.ofProviderHubexposes named provider lookup and aliases.
Selection, reuse, and concurrency helpers
pick,pickSet,shuffle,weighted,unique,repeat,sequence,poolthreadLocalsupplies one generator instance per calling thread.
Domain namespaces
For discoverability, the same families are grouped under person, finance, location,
network, text, commerce, identifier, and datetime. Each namespace accepts an optional
GeneratorConfig.
Type-based lookup
forType(Class<T>) supplies built-ins for primitive/wrapper scalars, String, Number, big
numbers, atomics, UUID, Locale, URI/URL, legacy date/time types, and common java.time
types. It throws IllegalArgumentException for unsupported classes; use an explicit generator or
an object override for those types.