Hi Gary,

I'm not sure what to add frankly. If anything, a full-fledged generic type
signature generator would be cool, but that's beyond my reach... :)

And my simple case (think List<String>) works perfectly fine right now.

Many greetings,
Stefan

On Sun, 1 May 2022 at 13:45, Gary Gregory <garydgreg...@gmail.com> wrote:

> Hi Stefan,
>
> Feel free to provide a PR on GitHub ;-)
> That is the best way to nudge the component in the direction you need.
>
> Gary
>
> On Sat, Apr 30, 2022, 18:36 Stefan Reich
> <stefan.reich.maker.of....@googlemail.com.invalid> wrote:
>
> > OK I think I figured it out. There is setSignature in
> > org.apache.bcel.generic.Type which I need to call with my generic field
> > signature (since direct representations of generic types are actually not
> > built into BCEL yet).
> >
> > Not a problem, what's unfortunate is just that setSignature is
> > package-protected so I'd have to patch BCEL to call it.
> >
> > The field signature itself is protected so I could set it directly in a
> > subclass of ObjectType.
> >
> > However, there is a note that say this practice will be made impossible
> in
> > the future. So, in conclusion, I am proposing to change that note (in
> > org/apache/bcel/generic/Type.java):
> >
> > /**
> >  * @deprecated (since 6.0) will be made private; do not access
> > directly, use getter/setter
> >  */
> > @Deprecated
> > protected String signature; // signature for the type TODO should be
> > private
> >
> >
> > and/or making the setSignature method in the same class public.
> >
> > Greetings,
> > Stefan
> >
> >
> >
> > On Sat, 30 Apr 2022 at 17:42, Stefan Reich <
> > stefan.reich.maker.of....@googlemail.com> wrote:
> >
> > > Hi, the title basically says it... I'm trying to create a field with a
> > > parameterized type (e.g. List<String>), but I can't find a subclass of
> > Type
> > > representing a parameterized type that I could pass to the FieldGen
> > > constructor.
> > >
> > > Thanks,
> > > Stefan
> > >
> > > --
> > > == Gaz.AI ==
> > >
> >
> >
> > --
> > == Gaz.AI ==
> >
>


-- 
== Gaz.AI ==

Reply via email to