private static void manageExtends(ClassDiagram system, Map<String, RegexPartialMatch> arg, final Entity entity) {
		if (arg.get("EXTENDS").get(1) != null) {
			final Mode mode = arg.get("EXTENDS").get(1).equalsIgnoreCase("extends") ? Mode.EXTENDS : Mode.IMPLEMENTS;
			final String other = arg.get("EXTENDS").get(2);
			EntityType type2 = EntityType.CLASS;
			if (mode == Mode.IMPLEMENTS) {
				type2 = EntityType.INTERFACE;
			}
			if (mode == Mode.EXTENDS && entity.getType() == EntityType.INTERFACE) {
				type2 = EntityType.INTERFACE;
			}
			final IEntity cl2 = system.getOrCreateClass(other, type2);
			LinkType typeLink = new LinkType(LinkDecor.NONE, LinkDecor.EXTENDS);
			if (type2 == EntityType.INTERFACE && entity.getType() != EntityType.INTERFACE) {
				typeLink = typeLink.getDashed();
			}
			final Link link = new Link(cl2, entity, typeLink, null, 2, null, null, system.getLabeldistance(),
					system.getLabelangle());
			system.addLink(link);
		}
	}