Methods can be generated too:
<bcel:method name="methodName" returns="int" > <bcel:arg type="int" name="arg1"/> <bcel:body language="javascript"> <!-- Script to evaluate ---> super.methodName(arg1) + arg1*arg1 </bcel:body> </bcel:method> It can implement or override methods this way, but It can be possible to implement without BCEL, I am not sure, but it seems jython can extend/implement JAVA classes/interfaces and return jython classes as JAVA types. > From: "Wannheden, Knut" <[EMAIL PROTECTED]> > > Sounds cool! > > > > IMHO, the tags and attributes could have slightly more intuitive names. > > Agreed... > > > E.g. > > > > <bcel:class name="org.foo.Test" superClass="java.lang.Object"> > > how about extends="java.lang.Object" instead of superClass? > > > > <bcel:property name="bar" type="int" setter="false"/> > > <bcel:property name="bam" type="String"/> > > </bcel:class> > > Nice! > > James > ------- > http://radio.weblogs.com/0112098/ > > > > > Cheers, > > > > -- > > knut > > > > > -----Original Message----- > > > From: Mark R. Diggory [mailto:[EMAIL PROTECTED]] > > > Sent: Montag, 20. Januar 2003 00:06 > > > To: Jakarta Commons Developers List > > > Subject: [Jelly] BCEL Taglibrary Beginnings > > > > > > > > > I started writting the beginnings of a BCEL taglibrary. > > > Although it may > > > be a bit different than others may anticipate. > > > > > > Basically I've built two tags and a supporting "BeanExtender" > > > class to > > > support them. > > > > > > <bcel:extends > > > baseClass="java.lang.Object" > > > packageName="org.foo" > > > className="Test"> > > > <bcel:add-property name="bar" propertyType="int" write="false"/> > > > <bcel:add-property name="bam" propertyType="java.lang.String"/> > > > </bcel:extends> > > > > > > Basically creates a new Class (org.foo.Test) that has: > > > > > > package org.foo; > > > > > > public Test extends java.lang.Object { > > > > > > private int bar; > > > private String bam; > > > > > > public Test(){} > > > > > > public int getBar(){ > > > return bar; > > > } > > > > > > public String getBam(){ > > > return bam; > > > } > > > > > > public void setBam(String bam){ > > > this.bam = bam; > > > } > > > } > > > > > > It then "changes" the Security access on the ClassLoader "define" > > > method. Allowing the class to be added into the current > > > loader. Once the > > > class is available it can then be instantiated by <useBean> or <new>. > > > > > > I'm sure there are some more "flexible" ways to design the > > > Taglibrary, I > > > consider this to be a "first blush" over the idea. I'd be > > > glad to donate > > > the code if others are interested in developing it too. > > > > > > -Mark Diggory > > > > > > > > > -- > > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > __________________________________________________ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>