<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<font size="4"><font face="monospace">Currently the
ConstantPoolBuilder is another place we we attach options. This
was more of a sin of convenience than anything else; the theory
was that if we are transforming a class, we'll parse it with a
set of options, and then generate a new class which shares its
CP, and the options came along for the ride. <br>
<br>
Searching for a better name that ClassfileContext. The name
Classfile is too good to waste, but it doesn't represent a
classfile (that's ClassModel), so calling the new thing
Classfile would likely be weird. Also ClassfileContext would
make it harder to discover the key entry points (build/parse).
Classfile.Context is better in that it is more discoverable at
least. <br>
<br>
Classfile{Parser,Generator} are more discoverable but only tell
half the story, and there's no obvious "first half" of the
story. ClassfileReaderWriter is discoverable and honest but
long. Classfile{Broker,Manager,Mediator} sound like parodies of
the Design Patterns era. <br>
<br>
A slightly cheeky but possibly viable option is "Classfiles";
while not a collection of classfiles, it is a collection of
behaviors _about_ classfiles. <br>
<br>
Classfiles.of(options).parse(bytes)<br>
Classfiles.of(options).generate(handler)<br>
<br>
<br>
<br>
<br>
</font></font><br>
<div class="moz-cite-prefix">On 5/17/2023 11:21 AM, Brian Goetz
wrote:<br>
</div>
<blockquote type="cite" cite="mid:771c9153-9235-f349-d239-6ca6cafb8f7b@oracle.com">
<font size="4"><font face="monospace">These are basically what is
on my list, though I had in mind to move _all_ option
information to the context, and leave it out of individual
processing decisions. </font></font><br>
<br>
<div class="moz-cite-prefix">On 5/17/2023 9:59 AM, - wrote:<br>
</div>
<blockquote type="cite" cite="mid:CABe8uE2TfMUXRj-bSoOmpOS4kXb3SVDdpkjiRMhsHaxvqLk=9w@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">Hi,
In the discussions a few weeks ago, we envisioned a Classfile context
object shared across multiple Classfile processing scenarios, mainly
for Class hierarchy information caching.
I want to confirm that these are contents of the object, mainly
promoted from individual options:
- Class Hierarchy information caching
- Custom attribute processing
- A set of default options, propagated to individual processing (may
be overridden classfile-wise)
What else is planned for the context object currently? Please don't
hesitate to propose. Thanks!
Chen Liang
</pre>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>