|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: Requesting new featuresHm. I don't quite get your point. All of ExpressionEvaluator, ScriptEvaluator and ClassBodyEvaluator support a setClassName() method, which allows you to define a custom class name and package.
So where is your problem? I added this as a feature request to JIRA, see http://jira.codehaus.org/browse/JANINO-72 Please register on CODEHAUS JIRA and click "Watch it" on that page to monitor progress.
CU Arno |
|
|
Re: Requesting new featuresHm. I don't quite get your point. All of I anticipated that it is possible to use java-class source file "as is" without any additional external calls. It seems I can't just read and execute, I need to "setClassName". So, if I want to launch such code... ==================================== package my.cool.package; public class My { // etc. } ==================================== ...I have to cut first row, call setClassName() method and use generic procedure to launch code? It is not a problem, but why don't to do this inside Janino? I added this as a feature request to JIRA, see That's nice, but I think autoboxing isn't the only thing to care about. There a many other things that are very usefull. Anyway, it is better than nothing.
Best regards, |
|
|
Re: Requesting new featuresHi Ilya,
Ilya Nedoluzhko schrieb: ... > I anticipated that it is possible to use java-class source file "as is" > without any additional external calls. It seems I can't just read and > execute, I need to "setClassName". So, if I want to launch such code... > ==================================== > package my.cool.package; > > public class My { > // etc. > } > > ==================================== > ...I have to cut first row, call setClassName() method and use generic > procedure to launch code? It is not a problem, but why don't to do this > inside Janino? Now I got your point. Just call Reader r = new StringRead( "package my.cool.package; public class My { ... }" ); Class c = new SimpleCompiler(null, r) .getClassLoader() .loadClass("my.cool.package.My"); That should do the job. > > 2) While it is crucial to keep library size small - I agree, it > is necessary to support new Java 5 features, such as templates, > foreach-style cycles and autoboxing. Especially the last ones, > because of importance in scripting. > > I added this as a feature request to JIRA, see > > That's nice, but I think autoboxing isn't the only thing to care about. > There a many other things that are very usefull. Anyway, it is better > than nothing. Feel free to post them on JIRA! CU Arno --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
static importsIn JBoss Rules we allow users to use "functions" in their code, this
currently involves regexp muning to turn it into a static method call. However We are getting to the stage where this is just getting nasty. We have since found that the Eclipse JDT compiler allows you to use static imports and still target jdk1.4 bytecode, so we are now thinking of adopting this to ease our coding. The downside of this means that unless Janino was able to support static imports we may have to drop support for Janino in JBoss Rules. So my request is, could static import support be built into Janino? Thanks Mark --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |