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
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 ori
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 ch
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 C
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://
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
-
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.
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 origina
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=viewt
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
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 po
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=
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=repl
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=posti
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 :
h
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&
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#39
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
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
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 emai
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?mo
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?modu
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 :
htt
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 :
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.jbo
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
---
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.
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&
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
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.
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#389
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
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
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
--
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
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
--
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 :
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=
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 w
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 pos
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
--
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
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 orig
"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=
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 In
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=388250
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
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 th
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
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.h
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#3880
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
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.jbos
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 sponsore
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
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
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&o
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 Ja
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.htm
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=38778
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 yo
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
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
--
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.h
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
-
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&
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=pos
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
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 run
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.ht
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,
$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 canno
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
-
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
--
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=r
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?mod
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
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
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
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&mod
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
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,
...
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
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.j
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 ob
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 interfa
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.or
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 th
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=postin
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 =
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.N
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
--
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
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=38
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.Ne
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 exa
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
--
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=b
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
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
---
1 - 100 of 221 matches
Mail list logo