Skip to content

Conversation

dmlloyd
Copy link
Member

@dmlloyd dmlloyd commented May 15, 2025

Fixes #335.

Version 1 of this change used type-safe constants for all of the modifiers and access levels; it was pretty nifty but added about 30-40 new types, so it seemed a bit to heavy to justify.

This version makes a fair effort to put convenience methods in the right place, but otherwise does all checking at run time.

At present, if you try to introduce a flag to a creator which always forces that flag to be set, then you will get an exception. I'm undecided whether this is a preferable behavior.

I did not do anything about default access levels or modifiers yet, other than more or less mirroring what was already in the code.

@dmlloyd dmlloyd added the 2.x Issue applies to Gizmo 2.x label May 15, 2025
@Ladicek
Copy link
Contributor

Ladicek commented May 19, 2025

Mostly LGTM, just a few small corrections and questions.

dmlloyd added 7 commits May 21, 2025 10:57
Fixes quarkusio#335.

Version 1 of this change used type-safe constants for all of the modifiers and access levels; it was pretty nifty but added about 30-40 new types, so it seemed a bit to heavy to justify.

This version makes a fair effort to put convenience methods in the right place, but otherwise does all checking at run time.

At present, if you try to introduce a flag to a creator which always forces that flag to be set, then you will get an exception. I'm undecided whether this is a preferable behavior.

I did not do anything about default access levels or modifiers yet, other than more or less mirroring what was already in the code.
…, so that we do not have the `NONE` location anymore
@dmlloyd dmlloyd merged commit 70fdb07 into quarkusio:main May 22, 2025
1 check passed
@dmlloyd dmlloyd deleted the flags-2 branch May 22, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issue applies to Gizmo 2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

avoid leaking the ClassFile API for working with modifiers (AccessFlag)
2 participants