"Discover new dimensions of scripted Java"
"Furash Gary" <furashg-sZWokWQQVgMxjvOLE2GS1/[email protected]> Mon, 10 Apr 2006 10:12:49 -0700
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Message-ID | <A8F90A7E212A1B49A8A9EBF2E5C3E106049FE702@mcaosx2.ca.mcao.maricopa.gov> |
I stumbled across a pretty nifty article, "Discover new dimensions of
scripted Java," that shows you how to set stuff up so that your java
code can instantiate what it thinks are java classes, which at runtime
get resolved into beanshell scripts. The initial caller doesn't need to
know anything about the interpreter, etc. It gets back what looks to it
like the class it was asking for.
Did any of this functionality get included into 2.0? (just a question).
It would be kind of cool to be able to say something like:
import org.beanshell.*;
java SomeJavaClass() {
...
BeanshellClass c = newBeanshellClass("SampleBeanshellClass.bsh", X,
Y);
println(c.potato);
...
}
then have a script somewhere called SampleBeanshellClass.bsh
with stuff like
getPotato() {
some scripty stuff
}
that really gets called at runtime without having to do the interpreter
and mapping stuff.
g
Gary Furash, MBA, PMP, Applications Manager
Maricopa County Attorney's Office