Skip to content

Improve generator #1

@dowglaz

Description

@dowglaz

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 contains int
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions