[jboss-user] [Javassist] - Re: Can JavaAssist change a static final field?

2012-11-22 Thread Shigeru Chiba
Shigeru Chiba [https://community.jboss.org/people/chiba] created the discussion Re: Can JavaAssist change a static final field? To view the discussion, visit: https://community.jboss.org/message/778013#778013 -- According to my memory

[jboss-user] [Javassist] - Re: License ambiguity to hopefully clear up.

2012-11-22 Thread Shigeru Chiba
Shigeru Chiba [https://community.jboss.org/people/chiba] created the discussion Re: License ambiguity to hopefully clear up. To view the discussion, visit: https://community.jboss.org/message/778014#778014 -- That's a kind

[jboss-user] [Javassist user questions] - Re: Using Javassist inside Mojo

2009-06-04 Thread chiba
Have you checked the ClassPool object can access BeforeMethod? Please try: method.getDeclaringClass().getClassPool().get(org.testng...BeforeMethod) If this returns null, the ClassPool does not know how to obtain the class file. Maybe the appended class path is wrong. Otherwise, something I

[jboss-user] [Javassist user questions] - Re: Using Javassist inside Mojo

2009-06-04 Thread chiba
OK, the problem is that the context class loader obtained by: Thread.currentThread().getContextClassLoader() could not find org.testng...BeforeMethod. So you must add testng-5.8-jdk15.jar to the class path of the context class loader. Otherwise, you can add that jar file to the class path of

[jboss-user] [Javassist user questions] - Re: serialVersionUID issue

2008-12-05 Thread chiba
Thank you, I modified SerialVersionUID according to your post. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4194662#4194662 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4194662

[jboss-user] [Javassist user questions] - Re: NullPointerException in RuntimeSupport.DefaultMethodHand

2008-09-18 Thread chiba
I fixed this bug. Could you download the source from the repository and make sure it works? Thank you View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4177506#4177506 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4177506

[jboss-user] [Javassist user questions] - Re: Making delegators thread-safe

2008-09-18 Thread chiba
I fixed this bug in a slightly different way (by using a synchronized block). So could you download the latest source and make sure it works? If it's OK, this fix will be included in Javassist 3.9.0. View the original post :

[jboss-user] [Javassist user questions] - Re: How to create CtClass java.lang.Object

2008-03-06 Thread chiba
anonymous wrote : I see you not uploading latest versions to maven repozitory. Do you want to delegate this task to me? Thank you. But I think someone else should be responsible for this. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4134597#4134597 Reply to

[jboss-user] [Javassist user questions] - Re: How to create CtClass java.lang.Object

2008-03-04 Thread chiba
You can change the super class just after you create a new CtClass object. Some factory methods like ClassPool#makeClass() takes a super class as a parameter. Don't these ways satisfy your needs? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4133967#4133967

[jboss-user] [Javassist user questions] - Re: How to create CtClass java.lang.Object

2008-03-04 Thread chiba
Ah.. it is not allowed in J2SE to create another version of java.lang.Object. For your purpose, what about: CtClass klass = classPool.get(java.lang.Object); You can modify klass as you want. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4133988#4133988 Reply

[jboss-user] [Javassist user questions] - Re: How to create CtClass java.lang.Object

2008-03-04 Thread chiba
So what about reusing an existing CtClass that represents java.lang.Object? By default, any ClassPool contains java.lang.Object. My idea is to get that CtClass object from the pool and modify it to be what you need. View the original post :

[jboss-user] [Javassist user questions] - Re: Duplicate a method

2008-02-21 Thread chiba
Your way is dangerous. Suppose the following method: int foo(int i) { int j = 3; return j + i; } At the bytecode level, the variable i would be register 1 and j would be register 2. If you add a parameter k, you must change the bytecode of the method body so that the variable j will be

[jboss-user] [Javassist user questions] - Re: javassist can't work with jdk1.6

2007-05-04 Thread chiba
I fixed this problem and the new source is now available from the CVS HEAD. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4043397#4043397 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043397

[jboss-user] [Javassist user questions] - Re: Javassist getMethods() returns protected methods?

2007-05-04 Thread chiba
Thanks, but it a spec... There was some reason but I don't remember it. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4043398#4043398 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043398

[jboss-user] [Javassist user questions] - Re: Anomalous VerifyError (related to inner classes?)

2007-02-13 Thread chiba
Hi, The bytecode of access$0 in GridDataSopurce seems broken. If access$0 is generated by Javassist, can you find the source code given to Javassist for generating this method? I don't think access$0 is not a method implicitly generated by Javassist. Thanks View the original post :

[jboss-user] [Javassist user questions] - Re: AccessControlException on generated classes due to missi

2006-08-06 Thread chiba
Basically, Javassist provides a byte stream of a modified class file. How it is loaded is the responsiblity of the clients such as HiveMind. Although Javassist provides a covenient function for loading it by a simple class loader, the clients should use their own class loaders if they need some