Improve generator
Opened this issue · 0 comments
dowglaz commented
Create a .java solution generator to accelerate coding setup.
Given: filename
, returnType
and args
as arguments:
- Creates a $filename.java file (force camel case on $filename)
- Imports java.util.*
- Write a public method named
solution
returning$returnType
and receiving$args
- Write the class name in the file with $filename
- Write the static main method in the file
- Puts a
System.out.println(new
className.solution($args))
- Puts an integer reading in the main method if
options.readInt
- Puts an array of integer reading in the main method if
options.readArray
containsint
- Puts a printArray method in the class
- Puts a string reading in the main file if
options.readString
- Puts a char reading in the main file if
options.readChar