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

Support for multi-argument constructors #13

Open
ghost opened this issue Nov 12, 2013 · 4 comments
Open

Support for multi-argument constructors #13

ghost opened this issue Nov 12, 2013 · 4 comments

Comments

@ghost
Copy link

ghost commented Nov 12, 2013

From [email protected] on February 06, 2013 10:02:22

If I understand your process, it is quite feasible to create an additional utility class e.g. MultiArgumentConstructorAccess which will be able to execute creation of objects using your approach, but with an explicit constructor.

e.g. MultiConstructorAccess MultiArgumentConstructorAccess.get(Class type, Constructor constructor)
multiConstructorAccess.newInstance(Object... param)

This is needed for applications where effect of calling the default constructor can't be "fixed" after creation by calling of the setters (example: SWT, more exactly my code I am trying to migrate to your approach: https://github.com/milanaleksic/swt-gui-transformer/blob/master/swt-gui-transformer-core/src/main/java/net/milanaleksic/guitransformer/converters/ObjectConverter.java#L319).
SWT blocks the changing of the style to maintain the UI and OS-calls consistency (), so I can't call afterwards the "setStyle(...)" - there is no setter of this kind to call at all across the widget hierarchy. See here for example: http://osdir.com/ml/ide.eclipse.platform.swt.devel/2006-09/msg00026.html

Have you considered migration to github/bitbucket for easier pull request handling, so I can try to do this by myself and then send to you for approval?

Original issue: http://code.google.com/p/reflectasm/issues/detail?id=13

@ghost
Copy link
Author

ghost commented Nov 12, 2013

From [email protected] on February 06, 2013 08:20:03

Sounds like a nice feature, would accept a patch.

github is nice, but moving is not fun. For now a patch file or zip of all the source is fine (I can easily diff).

@ilovepumpkin
Copy link

Hi,

Is there any plan to support the contructor with parameters? It seems that this issue has been kept open for long time. No plan?

@NathanSweet
Copy link
Member

I have not had time to work on it, sorry.

@leozilla
Copy link

Is somebody working on this?

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

No branches or pull requests

3 participants