"alesj" wrote : Why do all these MutableX take MutableY as parameters?
| e.g.
|
| | public interface MutableMethodInfo extends MethodInfo
| | {
| | void setReturnType(MutableClassInfo returnType);
| |
| Why would you force a MutableY as a return type?
|
mostly because then we are sure that we will get a CtClass instance within the parameter.
there is also a String parameter if you would prefer to use that. it makes little sense to
have a ClassInfo param since then we would just do the same work internally as with the
String param.
"alesj" wrote :
| "stale.pedersen(a)jboss.org" wrote :
| | The usage of the Class parameter needs to be removed, internal methods using it
will just use the CtClass object.
| |
| How does this effect the (weak type) cache?
|
| "stale.pedersen(a)jboss.org" wrote :
| | The question is the method getType(), can we just remove it altogether? -its been
marked as deprecated.
| |
| You can, but then you have to fix all MC code. :-)
| Unfortunately we have quite a few places where we use it.
| MDR, Kernel, ...
|
hm, ok. after talking to Kabir we could add logic to the getType() method that if the
class isnt loaded, we could try to weave it on demand.
"alesj" wrote :
| "stale.pedersen(a)jboss.org" wrote :
| | We need functionality to get the method signature from a method. This could be
implemented in a utilclass, but i would rather see it added to the MethodInfo interface.
| |
| Signature API is part of MDR sub-project.
|
its another signature, this is something similar to CtBehaviour.getSignature(). imo it
belongs in MMI.
is it ok if i start commit to jboss-reflect? i can exclude the new files in the pom if
needed.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204772#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...