[External] : Re: ClassHierarchyResolver using Reflection information
Adam Sotona
adam.sotona at oracle.com
Wed Mar 22 19:00:22 UTC 2023
Optionally one more possible factory method:
* of(Predicate<ClassDesc> isInterface, Function<ClassDesc, ClassDesc> superclassOf)
From: Adam Sotona <adam.sotona at oracle.com>
Date: Wednesday, 22 March 2023 19:55
To: Brian Goetz <brian.goetz at oracle.com>, liangchenblue at gmail.com <liangchenblue at gmail.com>
Cc: Michael van Acken <michael.van.acken at gmail.com>, classfile-api-dev at openjdk.org <classfile-api-dev at openjdk.org>, asotona at openjdk.org <asotona at openjdk.org>
Subject: Re: [External] : Re: ClassHierarchyResolver using Reflection information
Based on the discussion in this thread I propose to make a first step and adjust ClassHierarchy factory methods following way:
* ofCached(ClassHierarchyResolver resolver)
* ofClassLoading(ClassLoader loader)
* ofResourceParsing(ClassLoader loader)
* ofParsing(Function<ClassDesc, InputStream> classStreamResolver)
* of(MethodHandles.Lookup lookup)
* of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass)
So the default can be defined as:
DEFAULT_CLASS_HIERARCHY_RESOLVER = ofCached(ofResourceParsing(ClassLoader.getSystemClassLoader()).orElse(ofClassLoading(ClassLoader.getSystemClassLoader())));
Please help me to polish exact methods naming.
Thank you,
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20230322/d75b27fb/attachment-0001.htm>
More information about the classfile-api-dev
mailing list