Re: BCEL How to create a field with a parameterized type?

2022-05-02 Thread Stefan Reich
ote: > 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 > wrote: > > > OK I think I figured it out. There is setSignature in &g

Re: BCEL How to create a field with a parameterized type?

2022-04-30 Thread Stefan Reich
forum, lol. My Java-based scripting language is coming along very nicely now. Have a nice day Stefan On Sun, 1 May 2022 at 00:35, Stefan Reich < stefan.reich.maker.of@googlemail.com> wrote: > OK I think I figured it out. There is setSignature in > org.apache.bcel.generic.Type which

Re: BCEL How to create a field with a parameterized type?

2022-04-30 Thread Stefan Reich
gs, 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), but I can't find a subclass of Type > representing a paramete

BCEL How to create a field with a parameterized type?

2022-04-30 Thread Stefan Reich
Hi, the title basically says it... I'm trying to create a field with a parameterized type (e.g. List), 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 ==

Re: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Stefan Reich
isibility and one location with ALL the information needed in the future. > > Gary > > > On Fri, Feb 4, 2022, 09:49 Stefan Reich > wrote: > > > Will you look at that. BCEL's verifier actually checks for this > > (Pass3aVerifier.java): > > > > public

Re: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Stefan Reich
ut I think I don't know enough about BCEL to actually do it. I'll leave it to the experts. Greetings On Fri, 4 Feb 2022 at 15:37, Stefan Reich < stefan.reich.maker.of@googlemail.com> wrote: > Update: They changed it in Java 5. ClassGen.setMajor(49) + > ClassGen.set

Re: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Stefan Reich
Update: They changed it in Java 5. ClassGen.setMajor(49) + ClassGen.setMinor(0) works. On Fri, 4 Feb 2022 at 15:26, Stefan Reich < stefan.reich.maker.of@googlemail.com> wrote: > Mystery solved, ladies and gentlemen... > > It was... > > the byte code version. BCEL ou

Re: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Stefan Reich
ub < > https://github.com/rmannibucau> | > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book > < > https://www.packtpub.com/application-development/java-ee-8-high-performance > > > > > Le jeu. 3 févr. 2022 à 01:42, Stefan Reich > a écrit : > >

Re: BCEL: Can't load Object.class using LDC

2022-02-02 Thread Stefan Reich
I'm mainly curious how it's possible that everything looks completely normal in javap (checked a dozen times), but the class verifier complains anyway? Something has to be different. Is there a way to dig deeper into a class file? Greetings On Wed, 2 Feb 2022 at 23:14, St

Re: BCEL: Can't load Object.class using LDC

2022-02-02 Thread Stefan Reich
;)V) Illegal type in constant pool stefan@lenovo-ThinkPad-X220:~/dev/classreftest$ On Wed, 2 Feb 2022 at 22:59, Gary Gregory wrote: > You should try the latest from git master. > > Gary > > On Wed, Feb 2, 2022, 15:41 Stefan Reich > wrote: > > > Hi again, > > >

Re: Optimizing ConstantPoolGen

2022-02-02 Thread Stefan Reich
Thank you On Wed, 2 Feb 2022 at 20:24, Gary Gregory wrote: > I would guess not. PRs (with tests) are welcome in GitHub. > > Gary > > On Wed, Feb 2, 2022, 12:02 Stefan Reich > wrote: > > > Hi folks, > > > > I'm getting into compiling my own little

Optimizing ConstantPoolGen

2022-02-02 Thread Stefan Reich
Hi folks, I'm getting into compiling my own little scripting language into Java byte code. Short experimentation with both Javassist and BCEL led me to use BCEL. Just a quick question: Has anyone looked into optimizing constant lookups in ConstantPoolGen (e.g. addInteger)? Right now, they are jus