juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Bognar <james.bog...@salesforce.com>
Subject Re: Adding BeanProperty to constructor arguments
Date Mon, 09 Jan 2017 14:33:29 GMT
I see what you mean.  There may be multiple constructors with different
arguments.  However, we could find the one with the correct argument
types.  In the example above, we would be looking for....

public MyBean(int, String);

On Mon, Jan 9, 2017 at 9:27 AM, John D. Ament <johndament@apache.org> wrote:

> James,
>
> Maybe, however specifically for constructor parsing there are cases where
> the attribute is passed in but not saved as an attribute.  Right now that
> type of solution wouldn't work.
>
> John
>
> On Mon, Jan 9, 2017 at 9:08 AM James Bognar <james.bognar@salesforce.com>
> wrote:
>
> > Hi John,
> >
> > Do you mean adding an index property on the @BeanProperty annotation that
> > denotes it's constructor parameter index?
> >
> > @BeanProperty(constructorIndex=0)
> > public int foo();
> >
> > @BeanProperty(constructorIndex=1)
> > public String bar();
> >
> >
> >
> > On Sun, Jan 8, 2017 at 9:39 PM, John D. Ament <johndament@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > I was wondering if there was a reason (or maybe equivalent) to using
> > > @BeanProperty on a constructor argument?  This way on BeanConstructor
> > > instead of having to list the ordered arguments, the annotation could
> be
> > > used to say which field it covered.
> > >
> > > John
> > >
> >
> >
> >
> > --
> > James Bognar
> >
>



-- 
James Bognar

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message