/** * QName Constructor. * * @param namespace * the namespace assigned to the YANG module * @param localName * YANG schema identifier */ private QName(final URI namespace, final String localName) { this(QNameModule.create(namespace), checkLocalName(localName)); }
/** * QName Constructor. * * @param namespace * the namespace assigned to the YANG module * @param localName * YANG schema identifier */ private QName(final URI namespace, final String localName) { this(QNameModule.create(namespace), checkLocalName(localName)); }
/** * Read a QName from a DataInput. The format is expected to match the output format of {@link #writeTo(DataOutput)}. * * @param in DataInput to read * @return A QName instance * @throws IOException if I/O error occurs */ public static QName readFrom(final DataInput in) throws IOException { final QNameModule module = QNameModule.readFrom(in); return new QName(module, checkLocalName(in.readUTF())); }
/** * Creates new QName. * * @param qnameModule * Namespace and revision enclosed as a QNameModule * @param localName * Local name part of QName. MUST NOT BE null. * @return Instance of QName */ public static @NonNull QName create(final QNameModule qnameModule, final String localName) { return new QName(requireNonNull(qnameModule, "module may not be null"), checkLocalName(localName)); }
/** * Read a QName from a DataInput. The format is expected to match the output format of {@link #writeTo(DataOutput)}. * * @param in DataInput to read * @return A QName instance * @throws IOException if I/O error occurs */ public static QName readFrom(final DataInput in) throws IOException { final QNameModule module = QNameModule.readFrom(in); return new QName(module, checkLocalName(in.readUTF())); }
/** * Creates new QName. * * @param qnameModule * Namespace and revision enclosed as a QNameModule * @param localName * Local name part of QName. MUST NOT BE null. * @return Instance of QName */ public static @NonNull QName create(final QNameModule qnameModule, final String localName) { return new QName(requireNonNull(qnameModule, "module may not be null"), checkLocalName(localName)); }