Source:
public void computeModuleUpdates(IClasspathEntry entry) throws JavaModelException { for (IClasspathAttribute attribute : entry.getExtraAttributes()) { String attributeName = attribute.getName(); String values = attribute.getValue(); if (attributeName.equals(IClasspathAttribute.ADD_EXPORTS)) { for (String value : values.split(":")) { int slash = value.indexOf('/'); int equals = value.indexOf('='); if (slash != -1 && equals != -1) { String modName = value.substring(0, slash); char[] packName = value.substring(slash+1, equals).toCharArray(); char[][] targets = CharOperation.splitOn(',', value.substring(equals+1).toCharArray()); addModuleUpdate(modName, new IUpdatableModule.PackageUpdate(packName, targets), UpdateKind.PACKAGE); } else { Util.log(IStatus.WARNING, "Invalid argument to add-exports: "+value); } } } else if (attributeName.equals(IClasspathAttribute.ADD_READS)) { for (String value : values.split(":")) { int equals = value.indexOf('='); if (equals != -1) { String srcMod = value.substring(0, equals); char[] targetMod = value.substring(equals+1).toCharArray(); addModuleUpdate(srcMod, new IUpdatableModule.ModuleUpdate(targetMod), UpdateKind.MODULE); } else { Util.log(IStatus.WARNING, "Invalid argument to add-reads: "+value); } } } else if (attributeName.equals(IClasspathAttribute.MODULE_MAIN_CLASS)) { IModuleDescription module = this.javaProoject.getModuleDescription(); if (module == null) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST)); addModuleUpdate(module.getElementName(), m -> m.setMainClassName(values.toCharArray()), UpdateKind.MODULE); } } }

Target:
public void computeModuleUpdates(IClasspathEntry entry) throws JavaModelException { for (IClasspathAttribute attribute : entry.getExtraAttributes()) { String attributeName = attribute.getName(); String values = attribute.getValue(); if (attributeName.equals(IClasspathAttribute.ADD_EXPORTS)) { for (String value : values.split(":")) { int slash = value.indexOf('/'); int equals = value.indexOf('='); if (slash != -1 && equals != -1) { String modName = value.substring(0, slash); char[] packName = value.substring(slash+1, equals).toCharArray(); char[][] targets = CharOperation.splitOn(',', value.substring(equals+1).toCharArray()); addModuleUpdate(modName, new IUpdatableModule.AddExports(packName, targets), UpdateKind.PACKAGE); } else { Util.log(IStatus.WARNING, "Invalid argument to add-exports: "+value); } } } else if (attributeName.equals(IClasspathAttribute.ADD_READS)) { for (String value : values.split(":")) { int equals = value.indexOf('='); if (equals != -1) { String srcMod = value.substring(0, equals); char[] targetMod = value.substring(equals+1).toCharArray(); addModuleUpdate(srcMod, new IUpdatableModule.AddReads(targetMod), UpdateKind.MODULE); } else { Util.log(IStatus.WARNING, "Invalid argument to add-reads: "+value); } } } else if (attributeName.equals(IClasspathAttribute.MODULE_MAIN_CLASS)) { IModuleDescription module = this.javaProoject.getModuleDescription(); if (module == null) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST)); addModuleUpdate(module.getElementName(), m -> m.setMainClassName(values.toCharArray()), UpdateKind.MODULE); } } }