Open-Lowcode icon indicating copy to clipboard operation
Open-Lowcode copied to clipboard

Control if strings are valid java class name or field names in StringFormatter

Open openlowcode opened this issue 5 years ago • 3 comments

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

openlowcode avatar Jan 29 '20 21:01 openlowcode

I cant find classes/methods

formatForJavaClass
formatForAttribute

mypablo avatar Mar 10 '20 13:03 mypablo

Hi,

warm welcome to Open Lowcode project.

The class to modify is: org.openlowcode.tools.file.StringFormatter

openlowcode avatar Mar 10 '20 20:03 openlowcode

Also, the controls needed are basically to check that the string passed:

  • starts with a letter
  • contains only letter and number as subsequent characters.

openlowcode avatar Mar 11 '20 05:03 openlowcode