#5 Simplier Bean syntax

open
nobody
None
5
2004-02-19
2004-02-19
Anonymous
No

Creating a JavaBean and setting several properties can
get very wordy in BeanShell.

For example in BeanShell...

SomeBean bean = new SomeBean();
bean.prop1 = value1;
bean.prop2 = value2;
bean.prop3 = value3;
bean.prop4 = value4;
bean{ "prop5" } = value5;

This syntax is ugly. Please find a way to reduce.

Examples:

SomeBean bean = new SomeBean(
prop1=value1;
prop2=value2;
prop3=value3;
prop4=value4;
prop5=value5 );

Syntax like this is much more readable, and easy to use
when scripting.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks