in dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java [61:97]
public void setAttribute(String name, Object value)
throws IllegalArgumentException {
if ("BodyFactory".equals(name)) {
if (value instanceof BodyFactory) {
this.bodyFactory = (BodyFactory) value;
return;
} else throw new IllegalArgumentException("Unsupported attribute value type for "+name+", expected a BodyFactory");
} else if ("MimeEntityConfig".equals(name)) {
if (value instanceof MimeConfig) {
this.mimeEntityConfig = (MimeConfig) value;
return;
} else throw new IllegalArgumentException("Unsupported attribute value type for "+name+", expected a MimeConfig");
} else if ("MutableBodyDescriptorFactory".equals(name)) {
if (value instanceof BodyDescriptorBuilder) {
this.bodyDescriptorBuilder = (BodyDescriptorBuilder) value;
return;
} else throw new IllegalArgumentException("Unsupported attribute value type for "+name+", expected a MutableBodyDescriptorFactory");
} else if ("DecodeMonitor".equals(name)) {
if (value instanceof DecodeMonitor) {
this.decodeMonitor = (DecodeMonitor) value;
return;
} else throw new IllegalArgumentException("Unsupported attribute value type for "+name+", expected a DecodeMonitor");
} else if ("FlatMode".equals(name)) {
if (value instanceof Boolean) {
this.flatMode = (Boolean) value;
return;
} else throw new IllegalArgumentException("Unsupported attribute value type for "+name+", expected a Boolean");
} else if ("ContentDecoding".equals(name)) {
if (value instanceof Boolean) {
this.contentDecoding = (Boolean) value;
return;
} else throw new IllegalArgumentException("Unsupported attribute value type for "+name+", expected a Boolean");
}
throw new IllegalArgumentException("Unsupported attribute: "+name);
}