Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Nerd4J extensionNew to Visual Studio Code? Get it now.
Nerd4J extension

Nerd4J extension

Nerd4J

|
10 installs
| (0) | Free
VSCode extension to generate code based on the Nerd4J library
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nerd4J Extension

The VS Code extension for the Java library Nerd4J is designed to provide advanced features and streamline development with this library. With this extension, you can easily generate the necessary code for common operations such as generating the toString() method, withField() methods, and equals() and hashCode() methods based on selected fields.

Additionally, the extension provides predefined snippets for quickly importing the required libraries to use Nerd4J, simplifying the inclusion of the correct dependencies in your project. You can also find snippets for configuring Nerd4J dependencies in various build systems such as Apache Maven, Apache Ant, Apache Buildr, Groovy Grape, Grails, Leiningen, and SBT. This makes it easier to add the necessary dependencies to your project based on the build system you are using.

By leveraging the full potential of the VS Code extension for Nerd4J, you can enhance your productivity in Java application development, thanks to its ability to automate code generation and simplify dependency management.

Installation

  1. Install the extension from the marketplace
  2. Restart VS Code
  3. Open a java file and start coding

Alt Text

Features

The following commands are available in the VS Code command palette:

Nerd4J:

This is the entry point of all extension commands.

Nerd4J > Generate:

  • Method toString(): generates the toString method for the class pointed by the cursor.
  • Methods hashCode() and equals(): generates the hashCode and equals methods for the class pointed by the cursor.
  • Accessor methods: generates getters, setters, and withers for every field defined in the class or inherited from the ancestor classes.

All generated methods can be regenerated if they are already present. The java import of the Nerd4j library is automatically added if it is not already present.

Nerd4J > Settings:

  • Open settings: Shortcut tu access the Nerd4J extension settings
  • Clear settings: Restores the defaults for the Nerd4J extension settings
  • Java command: Allows to specify the Java executable to use

The first time the extension is used, a quick setup is required. By invoking the Clear settings command, the setup is deleted and will be prompted at the next usage.

Code snippets

There are a few code snippets available for quickly importing the required libraries to use Nerd4J.

Imports: The editor via autocomplete will suggest the following Nerd4J library imports:

  • import org.nerd4j.utils.lang.*;
  • import org.nerd4j.utils.tuple.*;
  • import org.nerd4j.utils.math.*;
  • import org.nerd4j.utils.cache.*;

Dependencies: The editor via autocomplete will suggest the Nerd4J library dependencies for the following dependency managers:

  • Apache Maven
  • Apache Ant
  • Apache Buildr
  • Groovy Grape
  • Grails
  • Leiningen
  • SBT
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft