if (mcf != null) {
if (mcf.getInitializerMethod(ANY_INIT_SIG) != null) {
m_marshaller = mcf;
} else if (mcf.getInitializerMethod
(ANY_INITCLASS_SIG) == null) {
throw new JiBXException("Marshaller class " +
mcf.getName() + " requires name to be set");
}
}
if (ucf != null) {
if (ucf.getInitializerMethod(ANY_INIT_SIG) != null) {
m_unmarshaller = ucf;
} else if (ucf.getInitializerMethod
(ANY_INITCLASS_SIG) == null) {
throw new JiBXException("Unmarshaller class " +
ucf.getName() + " requires name to be set");
}
}
}
if (name != null) {
// name supplied, make sure both support it
if (mcf != null && !mcf.isImplements(ALIASABLE_INTERFACETYPE)) {
throw new JiBXException("Marshaller class " +
mcf.getName() + " does not allow name to be set");
}
if (ucf != null && !ucf.isImplements(ALIASABLE_INTERFACETYPE)) {
throw new JiBXException("Unmarshaller class " +
ucf.getName() + " does not allow name to be set");
}
}
}