[JBoss-user] [Javassist user questions] - static field initializer

2006-01-03 Thread moonusamy
Could someone help on how to initialize a static class field of array type as 
follows:

private static final Foo[] _foos = {new Foo("a"), new Foo("b")};

Just feeding this string to CtField.make() causes a compilation error.


On a related note, how would I add a static block of code in my class? 

static {
 some code;
}

Thanks
Vijay

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

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


---
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] - Stronger complier capabilities

2005-12-28 Thread moonusamy
I need to be able to generate byte code from java source generated in memory. 
The problem I have using Javassist is that the compiler is not strong enough to 
flag compilation errors with line numbers and well-defined reasons.  I don't 
want to use javac or Eclipse JDT because they require files to be written to 
disk - all my code is in memory and can't be written to disk. I realize 
Javassist is probably not the right tool for what I want to do. Anyone on this 
forum suggest any alternatives?

Thanks
Vijay


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

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


---
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