/** * Creates a new module identifier using the specified name and slot. * A slot allows for multiple modules to exist with the same name. * The main usage pattern for this is to differentiate between * two incompatible release streams of a module. * * Normally all module definitions wind up in the "main" slot. * An unspecified or null slot will result in placement in the "main" * slot. * * Unless you have a true need for a slot, it should not be specified. * When in doubt use the {{@link #create(String)} method instead. * * @param name the name of the module * @param slot the slot this module belongs in * @return the identifier */ public static ModuleIdentifier create(final String name, String slot) { if (name == null) throw new IllegalArgumentException("Name can not be null"); if (slot == null) slot = DEFAULT_SLOT; return new ModuleIdentifier(name, slot); }
/** * Creates a new module identifier using the specified name and slot. * A slot allows for multiple modules to exist with the same name. * The main usage pattern for this is to differentiate between * two incompatible release streams of a module. * * Normally all module definitions wind up in the "main" slot. * An unspecified or null slot will result in placement in the "main" * slot. * * Unless you have a true need for a slot, it should not be specified. * When in doubt use the {{@link #create(String)} method instead. * * @param name the name of the module * @param slot the slot this module belongs in * @return the identifier */ public static ModuleIdentifier create(final String name, String slot) { if (name == null) throw new IllegalArgumentException("Name can not be null"); if (slot == null) slot = DEFAULT_SLOT; return new ModuleIdentifier(name, slot); }
return new ModuleIdentifier(name, slot);
i = moduleSpec.offsetByCodePoints(i, 1); } while (i < moduleSpec.length()); else { return new ModuleIdentifier(name, DEFAULT_SLOT); return new ModuleIdentifier(name, b.toString());