Valid characters in a module name
michael.rasmussen at zeroturnaround.com
Thu Jan 5 12:47:12 UTC 2017
On 5 January 2017 at 10:22, Ess Kay <s.2016.kay at gmail.com> wrote:
> There are utilities out there now that
> manipulate bytecode that are driven by script files that specify Java
> identifiers using a Java-style syntax. I raised the initial question
> because I have the job of updating such a utility to support Java 9. In
> part that entails parsing user specified module names out of a script file.
> If we now need to support quotes and spaces etc in a module identifier then
> it is going to be a problem.
As already mentioned, this should only be a problem for generated modules,
meaning when not compiled from a module-info.java file (where the language
level rules applies).
Also, assuming your bytecode manipulator touches classes and members, it
shouldn't be any different from what you currently have in order to support
generated classes, where the characters you mention are perfectly legal for
class and member names.
Example of such a generated class with spaces and quotes:
More information about the jigsaw-dev