-
Bug
-
Resolution: Fixed
-
P4
-
9-repo-kulla
-
None
Also, naming is a bit all over the map. Some suggested naming changes:
JShell.unresolved(snippet) is a confusing name, because it neither has a verb nor does it describe a quantity (as "methods" and "variables" do.) Perhaps: unresolvedDependencies()?
Sounds good.
The use of the term "type" as an umbrella for classes, interfaces, annotations, and enums is accurate, but may not be familiar to users. I think "classes" will be more familiar -- and, since all of these source-level entities compile into CLASSfiles, I don't think its inaccurate. (This shows up in a lot of places; "types()", "TYPE_DECL", etc.)
Again, remember the “users” of the API: they are API developers and tool hackers. They know what a type is.
Everywhere in the API naming and documentation is tied to the JLS. To use the JVM naming in one place, ClassSnippet, is confusing, esp. since as a SubKind they are split out.
UnresolvedException -> UnresolvedXxxException, for some Xxx.
UnresolvedReferenceException ?
XxxDeclSnippet -> XxxSnippet
That introduces a slight ambiguity, but it is cumbersome, OK I’ll remove.
onSnippetStatusChange -> onStatusChange or onSnippetEvent
SnippetStatusEvent -> SnippetEvent
These were changed based on previous requests for being more descriptive and consistent.
Is there a reference to existing (well named API) or documentation?