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

Static Inner classes Vs Non-Static Inner Classes #6

Closed
stephanenicolas opened this issue May 19, 2014 · 4 comments
Closed

Static Inner classes Vs Non-Static Inner Classes #6

stephanenicolas opened this issue May 19, 2014 · 4 comments

Comments

@stephanenicolas
Copy link

Hi @chibash ,

playing with Javassist, I realize that Javassist actually works pretty fine with static inner classes. I guess that when you mention (section 4.7 of the tutorial) :

Inner classes or anonymous classes are not supported.

you are talking about non static inner classes, as the byte code is more difficult to play with (due to passing a reference to Outer.this).

If so, would you mind to be more precise in the docs ?

Thx in advance,
Stéphane

@chibash
Copy link
Member

chibash commented May 20, 2014

The compiler included in Javassist does not support inner classes.
So if you pass the source code containing an inner-class declaration, the compiler throws an compilation error.

If you already have a class file of inner class, Javassist can handle it.

@stephanenicolas
Copy link
Author

Thx @chiba, this is more precise than the docs. Maybe you could update them.

S.

2014-05-20 5:50 GMT+02:00 Shigeru Chiba notifications@github.com:

The compiler included in Javassist does not support inner classes.
So if you pass the source code containing an inner-class declaration, the
compiler throws an compilation error.

If you already have a class file of inner class, Javassist can handle it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-43583912
.

@chibash
Copy link
Member

chibash commented May 20, 2014

I've done it.

@stephanenicolas
Copy link
Author

Thx for your responsiveness @chiba

2014-05-20 10:35 GMT+02:00 Shigeru Chiba notifications@github.com:

I've done it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-43599607
.

@chibash chibash closed this as completed Jun 21, 2014
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

No branches or pull requests

2 participants