Open-Lowcode
Open-Lowcode copied to clipboard
Control if strings are valid java class name or field names in StringFormatter
The following methods generate strings to be used for fields or classes inside java code. It should be checked if the string given as attribute is a valid java class / method name (does not start by a digit, no forbidden characters):
- formatForJavaClass
- formatForAttribute
I cant find classes/methods
formatForJavaClass
formatForAttribute
Hi,
warm welcome to Open Lowcode project.
The class to modify is: org.openlowcode.tools.file.StringFormatter
Also, the controls needed are basically to check that the string passed:
- starts with a letter
- contains only letter and number as subsequent characters.