Menu

#5 Simplier Bean syntax

None
closed
nobody
None
5
2018-08-01
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

  • nickl-

    nickl- - 2018-08-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     Creating a JavaBean and setting several properties can
     get very wordy in BeanShell.  
    
    • status: open --> closed
    • Group: -->
     
  • nickl-

    nickl- - 2018-08-01

    Ticket has been migrated to github.
    Please follow up on this over here: https://github.com/beanshell/beanshell/issues/94

     

Log in to post a comment.