class SpecificationReader {

	protected void parseDependency(nu.xom.Element eDependency, Application<Task, Dependency> application)
			throws ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException,
			NoSuchMethodException {
		Dependency dependency = toEdge(eDependency, null);

		String srcName = eDependency.getAttributeValue("source");
		Task source = application.getVertex(srcName);
		if (source == null) {
			throw new IllegalArgumentException("Source of dependency " + srcName + " not found: " + srcName);
		}

		String dstName = eDependency.getAttributeValue("destination");
		Task destination = application.getVertex(dstName);
		if (destination == null) {
			throw new IllegalArgumentException("Destination of dependency " + dependency + " not found: " + dstName);
		}

		application.addEdge(dependency, source, destination, EdgeType.DIRECTED);
	}

}