[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 skarzhevskyy
This is exactly what I do: --- klass = classPool.makeClass(java.lang.Object, null); --- When this is called the class is created but when I see bytecode System.out.println(klass.getSuperclass()) - java.lang.Object public class java.lang.Object extends java.lang.Object { } -- or

[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 skarzhevskyy
I know that in J2SE it should not work! BUT We are creating J2ME CLDC API classes! The java/lang/Object.class should be created and written to the disk then it would be used to build MIDlet applications. Created Object class is not used at runtime! The class is only used during J2ME build and

[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: How to create CtClass java.lang.Object

2008-03-04 Thread skarzhevskyy
Thanks! This approach works fine! Regards, Vlad PS I see you not uploading latest versions to maven repozitory. Do you want to delegate this task to me? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4134014#4134014 Reply to the post :