public class RandomGenerator extends Object
Random generator uses a pattern to generate a random sequence based on given pattern.
the supported characters are (can appear in pattern string):
Any other character inside the pattern is directly printed to the output.
Backslash is used to escape any character. For instance pattern "###\\.##" prints a floating point random number
org.identityconnectors.contract.data.macro.RandomMacro -- written by Dan Vernon, the original source of random generating functionality.
 Note: This is just a helper class. Users will directly use methods get() and
 random() of class Lazy.
 
| Constructor and Description | 
|---|
| RandomGenerator() | 
| Modifier and Type | Method and Description | 
|---|---|
| static String | generate(String pattern)generate a random string based on given pattern | 
| static Object | generate(String pattern,
        Class<?> clazz)
 generates a random string based on given pattern, finally tries to call
 constructor on the given class accepting a string argument. | 
public static String generate(String pattern)
pattern - see the definition in class headerpublic static Object generate(String pattern, Class<?> clazz)
generates a random string based on given pattern, finally tries to call constructor on the given class accepting a string argument.
pattern - see the definition in class headerCopyright © 2019. All rights reserved.