commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mwm.lt>
Subject Re: [Jelly] BCEL Taglibrary Beginnings
Date Mon, 20 Jan 2003 16:18:38 GMT
http://www.jython.org/docs/subclassing.html
http://www.jython.org/docs/embedding.html


>
>
> 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" <knut.wannheden@paranor.ch>
> > > 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:mdiggory@latte.harvard.edu]
> > > > 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:commons-dev-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <mailto:commons-dev-help@jakarta.apache.org>
> > >
> > __________________________________________________
> > 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:commons-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message