Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8956513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:48:12+00:00 2026-06-15T14:48:12+00:00

does anyone know of an existing script to create java objects based on constructor?

  • 0

does anyone know of an existing script to create java objects based on constructor?

I was thinking about writing one but decided to see if one already exists because it seems pretty simple.

Basically a common component of java objects involves writing

  1. public class nameofObject where the IDE typically takes care of the package statement and the class statement.

  2. creating private variables

  3. creating the constructor with the same names of those variables passed in

  4. making getters and setters

  5. deciding to assign the private variables to the local variables within the constructor , ie

    public nameofObject(String a, String b, String c){
        this.a = a;
        this.b = b;
        this.c = c;
    }
    

this process is very predictable (great for a script) and can be tedious (also great for a computer)

That example only has 3 variables, but objects can have 20, or hundreds of variables.

I haven’t seen an IDE or a script automatically create an entire object based on its constructor, but that would be very convenient, and I am considering writing a script in python or ant or bash to do this.

But before I reinvent the wheel, have you ever seen one that does this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:48:13+00:00Added an answer on June 15, 2026 at 2:48 pm

    Eclipse can help you as long as you create the arguments to the constructor.

    New classes (with package definition) can be created using the New class wizard (1).

    Ctrl+1 or Command+1 can:

    • Create field assignments including the private variables, when pressed while cursor is in a constructor argument (2, 5)

    • Create setters/getters, when pressed while cursor is in a field (4)

    This requires multiple actions/key presses, but is quite fast and convenient, and very flexible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

does anyone know of an existing module or script that will remove or identify
Does anyone know of an existing browser/OS useragent string grid? It's hard to test,
Does anyone know a better (shorter/more elegant) way than simply writing a loop and
A rather specific question, does anyone know an existing piece of code on how
Does anyone know of any existing solutions using javascript that can parse a crontab
Does anyone know of an existing function or property that provides a count of
We have an existing java-based heavyweight project that needed an interactive script interpreter. After
Does anyone know of an existing method of automatically cleaning the indentation of a
Does anyone know of an existing way to change the order of an existing
Does anyone know of an existing library for inspecting elements in the template? Currently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.