Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Class Generator for JavaNew to Visual Studio Code? Get it now.
Class Generator for Java

Class Generator for Java

A-fandino

|
2,539 installs
| (0) | Free
Generates the constructor, getters and setters for a Java class
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Java Constructor Generator

Generate a basic class constructor, the Getters and Setters of a Java Class by only creating it's attributes.

How to use

The extension can be executed with:

  • Ctrl + Shift + P > JAVA: Generate Class
  • With the CodeLens at the top of the document CodeLens Image

Example.java

   public class Example {

   protected String foo, bar;
   private int num;
   public boolean isFoo;

   }

After executing the extension we'll get:

    public class Example  {

    protected String foo, bar;
    private int num;
    public boolean isFoo;

    public Example(String  foo, String  bar, int  num, boolean  isFoo)  {
    this.foo = foo;
    this.bar = bar;
    this.num = num;
    this.isFoo = isFoo;
    }

    public  void setFoo(String  foo)  {
    this.foo = foo;
    }

    public  String getFoo()  {
    return this.foo;
    }

    public  void setBar(String  bar)  {
    this.bar = bar;
    }

    public  String getBar()  {
    return this.bar;
    }
    [...]
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft