compType = MetaClassFactory.get(Object.class);
marshaller = factory.getDefinition(Object.class).getMarshallerInstance();
}
if (marshaller == null) {
throw new MarshallingException("Failed to generate array marshaller for " + type.getCanonicalName() +
" because marshaller for " + compType + " could not be found.");
}
MappingDefinition newDef = new MappingDefinition(EncDecUtil.qualifyMarshaller(
new DefaultArrayMarshaller(type, marshaller)), true);
if (outerDef != null) {
newDef.setClientMarshallerClass(outerDef.getClientMarshallerClass());
}
factory.addDefinition(newDef);
}
}
@Override
public DefinitionsFactory getDefinitionsFactory() {
return factory;
}
@Override
public Marshaller<Object> getMarshaller(final String clazz) {
if (clazz == null) {
return NULL_MARSHALLER;
}
final MappingDefinition def = factory.getDefinition(clazz);
if (def == null) {
throw new MarshallingException("class is not available to the marshaller framework: " + clazz);
}
return def.getMarshallerInstance();
}