Planned features of a classfile context object
Brian Goetz
brian.goetz at oracle.com
Thu May 25 18:31:32 UTC 2023
A model created within a context can retain a reference to its creating
context. (We do a lot of this sort of thing already, where MethodModel
retains a reference to ClassModel, and where CPBuilder retains a
reference to Options.) So for operations that require a context, a
model derived from a classfile can use the context that created it.
Methods like parse/build/transform will be moved to the classfile
context object.
On 5/25/2023 2:02 PM, Adam Sotona wrote:
>
> I’m trying to figure out how the context will be passed down to the
> models (if it suppose to be detached from the models).
>
> Do we plan to enforce another CC argument to all models methods
> requiring context?
>
> Or do we plan to strip down all context-sensitive methods from all
> models and attach them to a kind of context-wrappers?
>
> For example codeModel.forEach(Classfile.Context.of(…), …) or
> Classfile.Context.of(…).forEach(codeModel, …) ?
>
> Thanks,
>
> Adam
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20230525/2a479890/attachment.htm>
More information about the classfile-api-dev
mailing list