@Override
    public NameID newNameID(final String nameIdFormat, final String nameIdValue) {
        val nameId = newSamlObject(NameID.class);
        nameId.setFormat(nameIdFormat);
        nameId.setValue(nameIdValue);
        return nameId;
    }
This is {@link AbstractSaml20ObjectBuilder}.
to build saml2 objects.

@author Misagh Moayyed
@since 4.1
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/util/AbstractSaml20ObjectBuilder.java