import static java.util.Objects.requireNonNull;
+import com.google.common.annotations.Beta;
import com.google.common.collect.Interner;
import com.google.common.collect.Interners;
import java.io.DataInput;
return new QName(module, checkLocalName(in.readUTF()));
}
+ /**
+ * Creates new QName composed of specified module and local name. This method does not perform lexical checking of
+ * localName, and it is the caller's responsibility to performs these checks.
+ *
+ * <p>
+ * When in doubt, use {@link #create(QNameModule, String)} instead.
+ *
+ * @param qnameModule Namespace and revision enclosed as a QNameModule
+ * @param localName Local name part of QName, required to have been validated
+ * @return Instance of QName
+ * @throws NullPointerException if any of the arguments is null
+ */
+ @Beta
+ public static @NonNull QName unsafeOf(final @NonNull QNameModule qnameModule, final @NonNull String localName) {
+ return new QName(qnameModule, localName);
+ }
+
/**
* Get the module component of the QName.
*