public class ValueSpaceGenerator extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PLACE_HOLDER |
static int |
RANDOM_WORDS_LENGTH |
Constructor and Description |
---|
ValueSpaceGenerator() |
Modifier and Type | Method and Description |
---|---|
static String[] |
createTemplateArray(int length)
Returns a set of templates pre-populated with placeholders.
|
static String[] |
getValueSpaceByNode(BiConsumer<String,String> importsAcceptor,
PackageID currentPkgId,
BLangNode bLangNode,
String[] template)
Returns a value space for a given BLangNode.
|
static String[] |
getValueSpaceByType(BiConsumer<String,String> importsAcceptor,
PackageID currentPkgId,
BType bType,
String[] template)
Returns value space for a given BType.
|
static String[] |
getValueSpaceByTypeSymbol(BTypeSymbol tSymbol,
String[] template)
Returns value space for a given BTypeSymbol.
|
static void |
populateValueSpace(String[] definedSpace,
String[] template,
Supplier<String> random)
Populates defined space into the templates.
|
public static final String PLACE_HOLDER
public static final int RANDOM_WORDS_LENGTH
public static String[] getValueSpaceByNode(BiConsumer<String,String> importsAcceptor, PackageID currentPkgId, BLangNode bLangNode, String[] template)
importsAcceptor
- imports acceptorcurrentPkgId
- current package idbLangNode
- BLangNode to evaluatetemplate
- templates to be modifiedString
modified templatescreateTemplateArray(int)
public static String[] getValueSpaceByType(BiConsumer<String,String> importsAcceptor, PackageID currentPkgId, BType bType, String[] template)
importsAcceptor
- imports acceptorcurrentPkgId
- current package idbType
- BType to evaluatetemplate
- templates to be modifiedString
modified templatespublic static String[] getValueSpaceByTypeSymbol(BTypeSymbol tSymbol, String[] template)
tSymbol
- BTypeSymbol to evaluatetemplate
- templates to be modifiedString
modified templatespublic static void populateValueSpace(String[] definedSpace, String[] template, Supplier<String> random)
definedSpace
- defined value spacetemplate
- templates setrandom
- random value generatorpublic static String[] createTemplateArray(int length)
length
- length of the templates setCopyright © 2019 WSO2. All rights reserved.