Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Custom Constructor #33

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JasonHertzog
Copy link

When a UML class has the same name as a UML operation it owns.

Example output:
` /**
* Default constructor
*/
public Person() {
}

/**
 * 
 */
private String name;

/**
 * @param name
 */
public Person(String name) {
	// TODO implement here
}`

Areas of future improvement: If it's a constructor, it could be good to also have documentation reflect that since right now it will only show the params in the docs.

Added support for custom constructors by checking if there are any operations with the same name as the class.
Adding support for custom constructors
WIP: modifying how I format the params when there is a custom class.
@wanddynosios
Copy link

Great stuff, @JasonHertzog!

I see one edge case though: When trying to make the default constructor private by adding a -MyObject()-operation, two constructors are created:

    /**
     * 
     */
    private MyObject() {
        // TODO implement here
    }
    /**
     * Default constructor
     */
    public MyObject() {
    }

Maybe this could be addressed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants