[JBoss-user] [Javassist user questions] - Re: ldc operand is null

2005-12-15 Thread chiba
How did you modify your method with Javassist?
It might be a bug.

Chiba


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912850#3912850

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912850


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Modifying CtClass

2005-12-10 Thread chiba
That's spec.  Because the field initialization is done in a static initializer,
when you remove a field, you also have to remove the initialization code
from the static initializer, which is not a simple task!.

So your alternative code (create another ClassPool) is a right solution.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911958#3911958

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3911958


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Bug in Annotation (Take 2) ?

2005-12-10 Thread chiba
Maybe javassist.jar has been loaded by a different class
loader from your application code.  Can you edit the following line to use a 
different class loader?

in toAnnotationType() in CtClassType

ClassLoader cl = Thread.currentThread().getContextClassLoader();

For example, it might have to be changed to:

ClassLoader cl = .class.getClassLoader();

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911953#3911953

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3911953


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Bug in Annotation (Take 2) ?

2005-12-03 Thread chiba
Hi,

anonymous wrote : I'd like to know the differences between "regular" java 
accessibility and "via javassist" accessibility.

There should be no difference since Javassist code simply calls
Class#forName() for accessing a class.  Does pacote.Anotacao
really exist under a directory included in CLASSPATH?

Another check is to directly call Class#forName("pacote.Anotacao")
in your code.  Does the call successfully return a Class object for that class?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3910439#3910439

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3910439


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to replace classname in local var declaration?

2005-11-30 Thread chiba
Hi,

It is a sort of bug of Javassist, but it should not make any real problem since 
a local variable is not really typed at bytecode level.  Your code should run 
without any problem
although a decompielr may claim the type of a local variable remains the same.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3909937#3909937

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3909937


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Varargs Injection Unsupported ?

2005-11-27 Thread chiba
Hmm... Java 5 has not been fully supported.  But I will add this to my Todo 
list.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3909210#3909210

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3909210


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Bug in Annotation (Take 2) ?

2005-11-27 Thread chiba
I think the exception was thrown because the @pacote.Anotacao interface is not 
accessible from your code using Javassist.  Can you check your code?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3909209#3909209

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3909209


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: copying methods

2005-11-23 Thread chiba
I again recommend you to use ClassPool and CtClass, CtMethod, ...  They provide 
a number of utility methods
for creating a getter method etc.

Otherwise, you must construct a MethodInfo by hand
(you must specify a sequence Java bytecode as a body).
Bytecode class would help you.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3908830#3908830

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3908830


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: loading a modified class directly from a ClassFile

2005-11-23 Thread chiba
I think it would be better to use ClassPool, CtClass, etc.
Your problem is that you added an interface but did not
change your class to be an abstract class (your class does
not implement all methods from the interface.)


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3908829#3908829

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3908829


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: ClassFile write creates bad byte code

2005-11-23 Thread chiba
You might want to use ClassPool, which does not load a class file as well.  
ClassPool reads a class file but does not load it.
ClassPool is a utility class for reading a class file from various resources.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3908828#3908828

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3908828


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: decoupled persistence layer?

2005-11-23 Thread chiba
writeFile() writes a class file under the current directory, which is sometime 
hard to identify if the program is running on Tomcat etc.  What if giving a 
full path to writeFile()?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3908827#3908827

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3908827


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: field = new CtField seems to do nothing

2005-11-23 Thread chiba
You can make a CtField by calling new CtField(), then set the modifiers to 
public by calling setModifiers().


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3908698#3908698

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3908698


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: field = new CtField seems to do nothing

2005-11-16 Thread chiba
new CtField() makes a filed visible within a package.  But I think 
Class#getFields() returns only public fields.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3907348#3907348

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3907348


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Javassist w/ Instrumentation API

2005-11-09 Thread chiba
You can use ClassPool.makeClass(InputStream).
Make a ByteArrayInputStream including your bytecode and pass it to makeClass().


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3906202#3906202

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3906202


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: annotation bug?

2005-11-09 Thread chiba
Oh, you must insert the following code before calling c.toClass():

cf.setMajorVersion(49);
  | cf.setMinorVersion(0);

I will add this info to the javadoc comment...  Thanks.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3906201#3906201

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3906201


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: cast errors

2005-10-29 Thread chiba
I think that problem is due to your inappropriate
use of class loaders.

Section 3.2 of Javassist tutorial might help you.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3904287#3904287

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3904287


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Create class from source in memory

2005-10-28 Thread chiba
You cannot make a CtClass from source code of a whole
class declaration.  However, you can first create an empty
CtClass and then append to it a CtMethod created from
source code of a method declaration.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3904152#3904152

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3904152


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: CtConstructor insertBefore problem

2005-10-28 Thread chiba
Please use insertBeforeBody() in CtConstructor.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3904150#3904150

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3904150


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Constructor -> Method

2005-10-28 Thread chiba
I have just implemented a convenient method
toMethod() in CtConstructor.  It changes a
constructor to a method.  super() or this() in the
body of the original constructor is eliminated.

Please download from CVS HEAD.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3904148#3904148

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3904148


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: intercepting array member access

2005-09-24 Thread chiba
OK, I'll put it in the TODO list.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3896888#3896888

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3896888


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Loading class problem

2005-09-14 Thread chiba
I guess the code above was loaded by a web app. server
like JBoss AS.  Please take a look at "Class search path"
in Section 1 of the tutorial.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3894721#3894721

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3894721


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Constructor -> Method

2005-09-14 Thread chiba
Hi,

You can remove super()/this() call from a constructor
if you use javassist.expr.ExprEditor.  Please read
the tutorial for more details.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3894718#3894718

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3894718


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Loading class from relaional storage

2005-09-10 Thread chiba
Unfortunately, Javassist is not a toolkit for editing
serialized data.  It might be a good idea that Javassist
supports that editing but currently Javassist does not.
Sorry.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3893992#3893992

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893992


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Loading class from relaional storage

2005-09-10 Thread chiba
I don't think you can read an old serialized data in any way
if you add a new field to that class.  What do you
mean by "inject the changes into the obsolete class"?
Do you want to convert a serialized data in the database
to be compatible with a new version of the class?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3893905#3893905

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893905


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - 3.1 RC2.

2005-09-06 Thread chiba
I have released 3.1 RC2 including bug fixes reported these days.
It was released mainly for an administrative reason but I hope
it is also convenient for you all.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3893315#3893315

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893315


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: annotation bug?

2005-09-06 Thread chiba
Thank you for a bug report.
I have fixed this bug.  Please download
the latest snapshot from CVS.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3893312#3893312

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893312


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Can we avoid

2005-09-06 Thread chiba
Are you using Eclipse for compiling a class?

I have fixed this problem (I don't call it a bug :-)
Can you try the latest snapshot available from CVS HEAD?

Thanks!


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3893235#3893235

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893235


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to get the value in switch case ?

2005-08-26 Thread chiba
Unfortunately, it is not simple at all.
Section 5.3 of Tutorial would help you but you must be an expert of Java 
bytecode.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3891832#3891832

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891832


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to get the value in switch case ?

2005-08-25 Thread chiba
Javassist does not provide direct support for that.
You must use the javassist.bytecode package and
parse a swtich instruction by hand.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3891581#3891581

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891581


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: instrumenting a loaded class

2005-08-24 Thread chiba
According to our experiment with HotSwap of JDK1.4
(JDK1.4 has HotSwap although it has a different name),
the overheaeds is less than 5% (normally about 2%).
We used SPECjvm98, which is a set of relatively small
programs.  So if you run a really big program, the amount
of the overhead may change.  I expect the overhead
will be still negligible, though.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3891550#3891550

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891550


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: getting a ctclass from an object

2005-08-24 Thread chiba
Hi,

I don't think there is a way to obtain a class file
from a running object.  Do you want to change
a class that has been loaded?  The JVM does not
allow you to do such a thing unless you use
HotSwap.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3891546#3891546

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891546


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: instrumenting a loaded class

2005-08-23 Thread chiba
For instrumenting a loaded class, you must use HotSwap
provided by Sun's JVM.  An upcoming new version of
Javassist provides a utility class for using HotSwap.
So if you are intrested, please down load the CVS HEAD
and test it.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3891375#3891375

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891375


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: class is frozen

2005-08-23 Thread chiba
Hmm... defrost() should be overridden in CtClassType, a subclass of CtClass.  I 
don't know why an exception is thrown.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3891374#3891374

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891374


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Setting a field in a constructor before super is called

2005-08-18 Thread chiba
I found a simpler way to generate Derived with Javassist.

abstract class Base {
  | Base() { System.out.println( getField() ); }
  | abstract int getField();
  | }
  | 
  | class Derived extends Base {
  | int field;
  | Derived() {
  | field = 1;
  | super();
  | }
  | int getField() { return field; }
  | }
  | 

To generate the Derived class above, first generate the following class:

class Derived extends Base {
  | int field;
  | Derived() {
  | super();
  | }
  | int getField() { return field; }
  | }
  | 

Then, call insertBefore() on the CtConstructor representing the constructor of 
Derived.
The inserted source code is something like this:

field = 1;

Note that insertBefore() inserts the code before super().
insertBeforeBody() inserts the code after super(), though.

I know this post is too late for Howard but it might be useful for others. :-)

Chiba

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890621#3890621

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890621


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Register 1 in a java.lang.VerifyError

2005-08-17 Thread chiba
Sorry, it's spec.

method.insertAfter(methodEnd, true); // true --> do as finally
  | 

If the second parameter to insertAfter() is true, then the local
variable declared by addLocalVariable() is not vivible in the
code inserted by insertAfter().  If the second parameter is false,
your code should work well.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890452#3890452

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890452


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: class is frozen

2005-08-17 Thread chiba
Hi,

Please use CtClass#defrost() or CtClass#detach().

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890435#3890435

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890435


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Error Compiling a switch

2005-08-17 Thread chiba
anonymous wrote : Now I detected anoher problem which I cannot solve. If I add 
in CtField public static final int TWO = 2; during runtime, the method call 
getConstantValue () will return a null.

Now this problem has been fixed.  Static final fields can be case labels.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890433#3890433

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890433


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Error in javassist.compiler.TypeChecker

2005-08-17 Thread chiba
I modified Javassist so that an error message is thrown instead of 
NullPointerException.

Thanks for your suggestion.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890430#3890430

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890430


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: initialization of static arrays

2005-08-15 Thread chiba
CtClass generatedClass = pool.makeClass("TestClass");
  | CtField myStaticField = new 
CtField(pool.get(MyClass[].class.getComponentType().getName()), 
"myStaticField", generatedClass);
  | myStaticField.setModifiers(Modifier.STATIC);
  | generatedClass.addField(myStaticField);

The third line is wrong.  It should be:

CtField myStaticField = new CtField(pool.get("MyClass[]"), "myStaticField", 
generatedClass);

In the original code, the type of the added field is not MyClass[] but MyClass.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890100#3890100

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890100


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Generating source code in adition to class files

2005-07-21 Thread chiba
I think using a Java decompiler is a good idea.
However, please don't say "Javassist has a bug!" if you see a decompiler fails 
to decompile the bytecode modified by Javassist. :-)


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885899#3885899

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885899


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: ClassCastException after javassist manipulation

2005-07-19 Thread chiba
Have you read Section 3.2 of the Javassist tutorial?
It would help you understand the problem.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885590#3885590

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885590


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Generating source code in adition to class files

2005-07-19 Thread chiba
Such a tool should be great but the implementation
would not be a simple task.  First of all, decompiling
Java bytecode to appropriate source code is not always
possible (well, might be possible but difficult).  Even 
reflecting changes on bytecode to the original source file is
not easy since some bytecode manipulation by Javassist
is hard to represent in Java.

I agree your idea is great but I don't have a plan to do
it in near future...

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885588#3885588

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885588


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: how to avoid adding field to InnerClasses

2005-07-19 Thread chiba
Your sample code seems weird.  At least, the first line:

CtClass cc = pool.makeClass("ClassA");

should be:

CtClass cc = pool.get("ClassA");

since makeClass() creates a new empty copy of ClassA.
Can you post a real test program?  If the behavior
you observed is real, it is a bug.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885587#3885587

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885587


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: circular references

2005-06-30 Thread chiba
"Mutual recursive methods" in Section 4.3 of the tutorial
has some hints.  To create two classes that refer to each
other, you must first create empty CtClasses for the two
classes and then add fields and methods.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3883210#3883210

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3883210


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Setting a field in a constructor before super is called

2005-06-23 Thread chiba
Thanks.  According to my simple study, javac of jdk1.4 and
javac of 1.5 seem to compile an inner class in a different way.
I found that javac 1.5 initializes a point to the outer class
before calling the super constructor.  On the other hand,
javac  1.4 does not do so.  Thus, your sample code of InnerTest
throws a NullPointerException if it is compiled by javac 1.4.

It might be only a pointer to the outer class that can be initialized
before calling a super constructor.  I'll study this more.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882512#3882512

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882512


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: javassist.CannotCompileException: [source error] invali

2005-06-23 Thread chiba
Thank you for your bug report.
I have fixed it.  Please download the latest snapshot
from the CVS HEAD.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882507#3882507

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882507


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Setting a field in a constructor before super is called

2005-06-21 Thread chiba
anonymous wrote : Note: this setting of a field before calling super is similar 
to how instance inner (nested) classes work, they set the field that points to 
their outer class before calling their own super constructor.

I don't think so... Setting the field that points to the outer class
should be done *after* calling the super constructor.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882279#3882279

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882279


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Accessing a parameter in a method's body

2005-06-20 Thread chiba
paramValue and returnValue are determined at runtime.
Since those values are not available during compile/load time,
you cannot obtain them by Javassist.

Although those values can be guessed by performaing
constant propagation since they are constant values,
Javassist does not support it.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882178#3882178

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882178


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: IllegalAccessException: java/lang/ClassLoader

2005-06-20 Thread chiba
Oh, does CannotCompileException have to
override printStackTrace(PrintStream)?

I'll fix it.

Another idea is to use JDK1.4's initCause().
Scott, can Javassist stop supporting JDK1.3?


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882159#3882159

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882159


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Problem with Verify Error Inconsistent stack height 0 !=

2005-06-08 Thread chiba
Can you tell us about the method parseText()?
What kind of code did you generate?

(please don't post 2500  lines of code...
only overview is fine.)

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880784#3880784

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880784


---
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: how to insert an 'assert' instruction ?

2005-06-08 Thread chiba
One more thing.

Calling Foo.class.desiredAssertionStatus() would take time.
The bytecode generated by javac calls this method in a
static initializer and the result is cached in a private static
field.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880781#3880781

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880781


---
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: how to insert an 'assert' instruction ?

2005-06-08 Thread chiba
If you don't need to turn on/off assertions, you can easily insert by
doing this:

insertAfter("if (expr) throw new AssertionError();")

This is equivalent to:

assert expr;

If you want to turn on/off by the -ea option, you have to also insert
the code for checking whether or not the assertion is effective
something like:

if (Foo.class.desiredAssertionStatus())
if (expr)
throw new AssertionError();



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880739#3880739

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880739


---
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: why pool.insertClassPath(String) not work?

2005-06-08 Thread chiba
insertClassPath() only gives a search path for *finding*
a class.  It is not used to write a modified class file.
Please use CtClass#writeFile(String directory).

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880735#3880735

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880735


---
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Error Compiling a switch

2005-06-08 Thread chiba
Yes, thank you!

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880733#3880733

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880733


---
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Error Compiling a switch

2005-05-31 Thread chiba
Ah... it's a known bug.  I will fix it.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879505#3879505

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879505


---
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: altering constructor implementation: how-to ?

2005-05-31 Thread chiba
Did you use getMethodInfo() in CtBehavior
instead of getMethodInfo2() at Line 5?

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879504#3879504

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879504


---
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: getting all fields of a class

2005-05-31 Thread chiba
Yes, you must recursively run through the class hierarchy.
Fields are never overridden.  So collecting all the fields
should be easy.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879502#3879502

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879502


---
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Problem with java.lang.VerifyError

2005-05-23 Thread chiba
Brennan and I investigated this problem and found that
the real problem was the value of the variable df declared in this
statement:

java.text.DateFormat df;

was used before the initial value is assigned to this variable.

Javac can detect this type of error is detected but the compiler
of Javassist does not.  This is simply for better runtime performance.





View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878774#3878774

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878774


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Problem with java.lang.VerifyError

2005-05-19 Thread chiba
You can dump by calling writeFile() in CtClass.
Can you put the class file on some web site or anywhere
you can put?  I'll check it.

Note:  please don't trust a decompiler too much.
It cannot decompile some correct class file in principle.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878385#3878385

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878385


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: help needed in creating new class from scratch

2005-05-16 Thread chiba
Line 39:
runMethod.invoke( helloWorld, new Object[] { } ); 

is wrong.  The first parameter helloWorld is a Class object.
It must be an instance of HelloWorld.  You must first
create an instance of HelloWorld.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877853#3877853

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877853


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: NullPointerException occurs when Handler#getType() metho

2005-05-16 Thread chiba
Thank you for your bug report and pretty good analysis.
It is really helpful.

anonymous wrote : To avoid this problem, I propose to check null of the return 
value of
  | ConstPool#getClassInfo() (type of the exception) in the getType() method

Yes, this is a correct and quick fix.  However, if your analysis is correct,
I think ExprEditor.edit(Handler) should not be called with a finally block.
(Note that Javac automatically adds a finally block for each synchronized
block.  So the exception table includes a catch block or a finally
block.)

Don't you think I must modify the implementation of ExprEditor
rather than getType()?  Or, do you like to hook both catch and finally
blocks?

Let me know your thought.  Thx.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877856#3877856

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877856


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: I've a problem When checking for null

2005-05-16 Thread chiba
I fixed this bug.  Please download the CVS HEAD.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877852#3877852

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877852


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Javassist and Java5's enumerations

2005-05-09 Thread chiba
For another request, I'll change ClassPool.get() to
accept [L...;


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877042#3877042

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877042


---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to get compiler errors

2005-04-18 Thread chiba
I agree that we need better help.
However, dumping a generated class in text format
is not a simple thing since *true* bytecode decompilation
is hard work.

By the way, have you checked the compiler-limitations
page of the Javassist tutorial?


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3874322#3874322

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3874322


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Is there a way to add a static block into the class.

2005-04-13 Thread chiba
You can use CtClass#makeClassInitializer()
and CtField#make().  Please look at javadoc.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3873804#3873804

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3873804


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Use JavAssist to obtain class annotation-list

2005-04-13 Thread chiba
Yes, you can.  Please take a look at javassist.bytecode.MethodInfo and 
javassist.bytecode.AnnotationsAttribute.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3873800#3873800

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3873800


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to get compiler errors

2005-04-13 Thread chiba
No, there is no way since Javassist uses its own small
(quick) compiler.  It is not supposed to be used as a
regular compiler.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3873795#3873795

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3873795


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: long method parameter must be explicitely qualified

2005-03-29 Thread chiba
Hmm.. the goal of the Javassist compiler is to help
the development of a bytecode translator.  It's not
to be the standard compiler.  But I put this fact to my
todo list.

Thanks!


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871902#3871902

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3871902


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: javassist.expr.MethodCall.getClassName() question (bug?)

2005-03-24 Thread chiba
anonymous wrote : how do i navigate to get the className of the Object that 
implements the interface?

You cannot get the actual class name of the target object.
This is not the limitation of Javassist.

Greeting h = new HelloWorld(); 
  | h.speak();

Since the value of h is determined only at runtime, you cannot know
the actual class name of the value of h when Javassist is running, i.e.
compile time or load time.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871508#3871508

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3871508


---
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: VerifyError on javassist generated constructor

2005-03-24 Thread chiba
I see you misinterpreted the summary table of
special variables.  I will update it to avoid such
misinterpretation.

Thank you for your suggestion.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871501#3871501

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3871501


---
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: inheritance question

2005-03-23 Thread chiba
It seems that multiple versions of OrgUnitType had been
loaded.  The error message should be interpreted as that
the super class of OrgUnitImpl is a different version of
OrgUnitImpl from the version that the cast operator
(i.e. the class generated by Javassist) expects.

If my observation is true, this is not a problem of Javassist
or it cannot be solved with reflection.  You should carefully
redesign the delegation scheme by class loaders.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871441#3871441

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3871441


---
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: VerifyError on javassist generated constructor

2005-03-23 Thread chiba
$0 means "this".  So maybe a right program is:


  | cons1.setBody("super((dome.interpretation.InterpretationFactory)$1, 
(dome.datamodel.FirstClassObject)$2);"); 
  | 

Note that the arguments are $1 and $2.

anonymous wrote : however if I don't then the javassist compiler complains that 
it cannot find the appropriate method. This is also true in methods as well as 
constructors.
  | 

This is because the type of $0 is not what you expected.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871435#3871435

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3871435


---
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Array Class Literals

2005-03-16 Thread chiba
Really?
Can you post a complete test case?
Thanks!


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3870411#3870411

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3870411


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Why is there no LocalVarAccess just like FieldAccess Exp

2005-03-06 Thread chiba
Yes, you can implement LocalVarAccess with the low-level
API.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868961#3868961

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868961


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to add a constant ?

2005-03-02 Thread chiba
See the following code:

CtClass cc = ...;
CtField f = CtField.make("private static final ...", cc);
cc.addField(f);


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868372#3868372

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868372


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Beginner's question !

2005-03-02 Thread chiba
At compile-time or load time?
No, you cannot get the value of a variable
since the value is not available before the
program starts running.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868371#3868371

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868371


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Array Class Literals

2005-03-01 Thread chiba
Let me make sure.
Javassist 3 can compile Object[].class.

Chiba


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868436#3868436

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868436


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: reading java 5.0 annotations

2005-02-27 Thread chiba
Yes, the default value is available from AnnotationDefault
attributes.  Thank you for your information.

I added the support of AnnotationDefault attributes to Javassist.
It is available from CVS HEAD or Branch_Javassist_3_0.

Chiba


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868097#3868097

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868097


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to replace this??

2005-02-25 Thread chiba
I see.  Your approach is right.  However, your approach
might complicate a program if the search pattern is
complex.

For example, if you want to find both

boolean b
= Display.getDisplay().getCurrent()

and

Display d = Display.getDisplay(this);
boolean b = d.getCurrent();

Then the pattern given to SmartBytecode would be
much more complicated.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867788#3867788

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867788


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Is CodeIterator.insertGap(int length) is supposed to ins

2005-02-23 Thread chiba
Well, if your post is really true, that behavior is a bug.
Can you show me a test case (simple one is fine)?

Thank you,

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867619#3867619

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867619


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Has somebody used javassist to perform Data Flow Analysi

2005-02-23 Thread chiba
Even the lower-level API does not directly support data flow
analysis.  But it is definitely possible to implement a data flow
analyzer on top of it.  Your contribution is welcome!

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867612#3867612

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867612


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to replace this??

2005-02-23 Thread chiba
I think you want to replace cascaded method calls
with another expression.

But I'm wondering whether or not such replacement
is used frequently enough to be included in the Javassist
API.  Do you think the Javassist API includes a method
for replacing two-cascaded method calls, three-cascaded,
...?  I would like to know your thought.

Thank you,

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867609#3867609

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867609


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] [Javassist user questions] - Re: Howto instrument print(a.toString()) ?!?

2005-02-23 Thread chiba
Did you assign the result of method.invoke() to $_?
e.g.

$_ = ($r)method.invoke($0, null);

Regards,

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867598#3867598

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867598


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Constructor modification?

2005-02-23 Thread chiba
Ah... the statements must be surrounded by {}.
So

setBody("{ System.out.println(...); ...println(...); }");

is correct.  I agree this spec. should be changed. :-(

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867593#3867593

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867593


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Can I get info about containing object of some methodCal

2005-02-23 Thread chiba
I hope my reply is not too late.

anonymous wrote : The question is: How can I get such static information about 
"someObj" using javassist?

The real static information of the target object is quite restricted
probably more than you expect.  The only information is the static
type of the target object, which is the class declaring the method.
For example,

String s = "foo";
int s = s.concat("bar").length();

In this example, the target expression of length() is s.concat("bar")
and it does not have a name.  The only static information is the type
of the target expression is String.




View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867592#3867592

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867592


---
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: reading java 5.0 annotations

2005-02-06 Thread chiba
Maybe that is because the default value is not included in each
class file. (I'm not sure)

public @interface Author {
  | 
  | String name() default "me";
  | 
  | int age() default 999;
  | }

Won't you try to read the annotations of the Author interface?

Regards,

Chiba


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3865438#3865438

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3865438


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Detecting and replacing operators expressions with Javas

2005-02-05 Thread chiba
I recommend using the lower-level API of Javassist, that is,
javassist.bytecode.*.  In fact, ExprEditor is a sort of wrapper
on top of that package.

I don't recommend you to use BCEL since it is slow.  You
should use either Javassist or ObjectWeb ASM.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3865400#3865400

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3865400


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Get a private final static field

2005-02-05 Thread chiba
You can obtain the value of a final static field if you go down
to the lower-level API of Javassist (I agree that the next
release of Javassist support this function with the regular
API).

You must get a java.bytecode.FieldInfo object from CtField
and then obtain a ConstantAttribute object from that
FieldInfo.  Finally, you must search a constant pool in a
class file to find the field value.

Note that this way works only for some basic types of fields,
for example, int or String.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3865398#3865398

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3865398


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: reading java 5.0 annotations

2005-02-05 Thread chiba
Can you replace AnnotationsAttribute.invisibleTag
with AnnotationsAttribute.visibleTag in the above
test code and try again?


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3865395#3865395

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3865395


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: reading java 5.0 annotations

2005-02-01 Thread chiba
The current release 3.0 does not provide high-level API.
So you must use the lower-level API, but using it is not difficult.
For example,


  | import javassist.*;
  | import javassist.bytecode.*;
  | 
  | CtMethod m = ... ;
  | MethodInfo minfo = m.getMethodInfo();
  | AnnotationsAttribute attr = (AnnotationsAttribute)
  | minfo.getAttribute(AnnotationsAttribute.invisibleTag);
  | if (atr != null) {
  | Annotation an = attr.getAnnotation("Author");
  | String s = ((StringMemberValue)a.getMemberValue("name")).getValue();
  | System.out.println("@Author(name=" + s + ")");
  | }
  | 

This prints the @Author annotation of the method m.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3864611#3864611

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3864611


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Bug in getDeclaringClass in 3.0RC1

2005-01-24 Thread chiba
I have released 3.0!
Please enjoy.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3863381#3863381

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3863381


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Limitations

2005-01-24 Thread chiba
Yes, that's a perfect solution.
(sorry, it's annonying...)

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3863380#3863380

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3863380


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Limitations

2005-01-19 Thread chiba
Although $proceed does not imply this problem,

newname($$);

would do.  I agree this is a bug, which should be fixed
soon.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862737#3862737

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862737


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to value a byte array

2005-01-19 Thread chiba
Yes, array initialization is quite inefficient in Java.
I think your technique using String is a right way.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862740#3862740

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862740


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Adding Methodes

2005-01-17 Thread chiba
Ah, pruning is now off by default.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862516#3862516

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862516


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Limitations

2005-01-17 Thread chiba
Hi,

1) The limitation is not applied to copied bytecode.
The tutorial says that the compiler does not understand
synchronized.  However, the upcoming release 3.0
supports a synchronized statement.  So please download
CVS HEAD or wait for several days.  We are going to release
3.0 soon.

2) For example,

class A {} 
class B extends A {} 
class C extends C {} 

class X { 
void foo(A a) { .. } 
void foo(B b) { .. } 
}

If the compiled expression is x.foo(new C()), where x is an instance of X, the 
compiler may produce a call to foo(A) although the compiler can correctly 
compile foo((B)new C()).

This description will be also included in the tutorial coming
with the next release.
 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862517#3862517

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862517


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Bug in getDeclaringClass in 3.0RC1

2005-01-13 Thread chiba
I have implemented getEnclosingClass().
The source is in CVS HEAD.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861963#3861963

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861963


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to value a byte array

2005-01-12 Thread chiba
If I'm correct, static final fields can be initialized 
in a static class initializer, that is,

class C {
  static {  }
 :
}




View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861855#3861855

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861855


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: Field rename

2005-01-12 Thread chiba
If you don't define a constructor of C at all, your
*compiler* define a constructor.  It may also modify
a constructor you defined so that it will insert some
code fragment for field initialization.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861854#3861854

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861854


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Javassist user questions] - Re: How to modify this statement with Javaassist?

2005-01-12 Thread chiba
Doesn't finding a method call to getResourceAsStream()
work?


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861856#3861856

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861856


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


  1   2   3   >