/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ @SuppressWarnings({"rawtypes"}) protected void setEntries(List<DestinationMapEntry> entries) { for (Object element : entries) { Class<? extends DestinationMapEntry> type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry) element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }
/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ protected void setEntries(List entries) { for (Iterator iter = entries.iterator(); iter.hasNext();) { Object element = (Object)iter.next(); Class type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry)element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }
/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ @SuppressWarnings({"rawtypes"}) protected void setEntries(List<DestinationMapEntry> entries) { for (Object element : entries) { Class<? extends DestinationMapEntry> type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry) element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }
/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ @SuppressWarnings({"rawtypes"}) protected void setEntries(List<DestinationMapEntry> entries) { for (Object element : entries) { Class<? extends DestinationMapEntry> type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry) element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }
/** * A helper method to allow the destination map to be populated from a * dependency injection framework such as Spring */ @SuppressWarnings({"rawtypes"}) protected void setEntries(List<DestinationMapEntry> entries) { for (Object element : entries) { Class<? extends DestinationMapEntry> type = getEntryClass(); if (type.isInstance(element)) { DestinationMapEntry entry = (DestinationMapEntry) element; put(entry.getDestination(), entry.getValue()); } else { throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element); } } }