---------------- LINKER
545612
@Descriptor("Gets the importation/exportation linker available")
    public void linker(@Descriptor("linker [-(import|export)] [ID name]") String... parameters) {
        List<ServiceReference> exportationLinkerRef = getAllServiceRefs(ExportationLinker.class);
        List<ServiceReference> importationLinkerRef = getAllServiceRefs(ImportationLinker.class);
        StringBuilder sbFinal = new StringBuilder();
        if (exportationLinkerRef.isEmpty() && importationLinkerRef.isEmpty()) {
            sbFinal.append("No linkers available.\n");
        } else {
            if (!exportationLinkerRef.isEmpty()) {
                for (ServiceReference reference : exportationLinkerRef) {
                    StringBuilder sb = new StringBuilder();
                    sb.append(displayServiceInfo(reference));
                    sb.append(createASCIIBox("Properties", displayServiceProperties(reference)));
                    sbFinal.append(createASCIIBox("Exportation Linker", sb));
                }
            }
            if (!importationLinkerRef.isEmpty()) {
                for (ServiceReference reference : importationLinkerRef) {
                    StringBuilder sb = new StringBuilder();
                    sb.append(displayServiceInfo(reference));
                    sb.append(createASCIIBox("Properties", displayServiceProperties(reference)));
                    sbFinal.append(createASCIIBox("Importation Linker", sb));
                }
            }
        }
        print(sbFinal.toString());
    }
881564
public static <T> List<T> list(boolean isLinked, Enumeration<T> enumration) {
		final List<T> list = list(isLinked);
		if (null != enumration) {
			while (enumration.hasMoreElements()) {
				list.add(enumration.nextElement());
			}
		}
		return list;
	}
504426
public static void withLink(Representation representation, String rel, String href, Optional<Predicate<ReadableRepresentation>> predicate, Optional<String> name, Optional<String> title, Optional<String> hreflang, Optional<String> profile) {
        if (predicate.or(Predicates.<ReadableRepresentation>alwaysTrue()).apply(representation)) {
            representation.withLink(rel, href, name.orNull(), title.orNull(), hreflang.orNull(), profile.orNull());
        }
    }
693762
@Override
	protected void doLinking() {
		IParseResult parseResult = getParseResult();
		if (parseResult == null || parseResult.getRootASTElement() == null)
			return;

		XtextLinker castedLinker = (XtextLinker) getLinker();
		castedLinker.discardGeneratedPackages(parseResult.getRootASTElement());
	}
1257281
@Nonnull
	public static <T> LTieDblFunctionBuilder<T> tieDblFunction(Consumer<LTieDblFunction<T>> consumer) {
		return new LTieDblFunctionBuilder(consumer);
	}
1208125
private static boolean isLink(Object data) {
    try {
      final Map<String, Object> map = (Map<String, Object>) data;
      final Map<String, Object> sys = (Map<String, Object>) map.get("sys");
      final String type = (String) sys.get("type");
      final String linkType = (String) sys.get("linkType");
      final String id = (String) sys.get("id");

      if ("Link".equals(type)
          && ("Entry".equals(linkType) || "Asset".equals(linkType)
          && id != null)) {
        return true;
      }
    } catch (ClassCastException cast) {
      return false;
    }
    return false;
  }
1052445
@Override
	public Optional<Link> findLinkWithRel(LinkRelation relation, String representation) {

		Assert.notNull(relation, "LinkRelation must not be null!");
		Assert.notNull(representation, "Representation must not be null!");

		return relation.isSameAs(IanaLinkRelations.SELF) //
				? findSelfLink(representation) //
				: super.findLinkWithRel(relation, representation);
	}
198026
void linkLast(final E e) {
        final E previousLast = last;
        last = e;

        if (previousLast == null) {
            first = e;
        } else {
            previousLast.setNext(e);
            e.setPrevious(previousLast);
        }
    }
900592
function link(linkSet, linkError) {

    var loader = linkSet.loader;

    if (!linkSet.loads.length)
      return;

    var loads = linkSet.loads.concat([]);

    for (var i = 0; i < loads.length; i++) {
      var load = loads[i];

      var module = doDynamicExecute(linkSet, load, linkError);
      if (!module)
        return;
      load.module = {
        name: load.name,
        module: module
      };
      load.status = 'linked';

      finishLoad(loader, load);
    }
  }
1056054
public function getView(int $row, array $row_data, Linker $linker): string
    {
        // Auto set _href for update links
        if (!$this->getHref()) {
            $tmp = $_GET;
            $tmp['do'] = str_replace('_default', '', $tmp['do']);
            $tmp['do'] = ($tmp['do'] ? '_' : '') . $tmp['do'] . '_order';
            $tmp['id'] = '{%id%}';
            $this->setHref(urldecode('?' . http_build_query($tmp)));
        }

        // Output
        $linker_array = ['do' => '_order', 'id' => $row_data['id']];
        if ($this->category_key !== null) {
            $linker_array[$this->category_key] = $row_data[$this->category_key] ?? '';
        }

        if ($this->href) {
            $up_link = $this->getParsedHref($row_data, $linker) . '&direct=up';
            $down_link = $this->getParsedHref($row_data, $linker) . '&direct=down';
        } else {
            $up_link = $this->getParsedHref($row_data, $linker, $linker_array + ['direct' => 'up']);
            $down_link = $this->getParsedHref($row_data, $linker, $linker_array + ['direct' => 'down']);
        }

        $current_row = $this->row_offset + $this->current_offset;
        if ($this->row_count >= 1) {
            if ($current_row === 0) $cell_data = '<a href="' . $down_link . '" class="nounderline dnd"><i class="fa fa-long-arrow-down"></i></a>';
            elseif ($current_row === $this->row_count) $cell_data = '<a href="' . $up_link . '" class="nounderline dnd"><i class="fa fa-long-arrow-up"></i></a>';
            else $cell_data = '<a href="' . $up_link . '" class="nounderline dnd"><i class="fa fa-long-arrow-up"></i></a>&nbsp;&nbsp;&nbsp;<a href="' . $down_link . '" class="nounderline dnd"><i class="fa fa-long-arrow-down"></i></a>';
        } else {
            $cell_data = '&nbsp;&nbsp;&nbsp;';
        }
        $this->current_offset++;

        return $this->getCellView($cell_data, $row_data);
    }
735363
@Override
    @SuppressWarnings("unchecked")
    public Spliterator<E_OUT> spliterator() {
        if (linkedOrConsumed)
            throw new IllegalStateException(MSG_STREAM_LINKED);
        linkedOrConsumed = true;

        if (this == sourceStage) {
            if (sourceStage.sourceSpliterator != null) {
                @SuppressWarnings("unchecked")
                Spliterator<E_OUT> s = (Spliterator<E_OUT>) sourceStage.sourceSpliterator;
                sourceStage.sourceSpliterator = null;
                return s;
            }
            else if (sourceStage.sourceSupplier != null) {
                @SuppressWarnings("unchecked")
                Supplier<Spliterator<E_OUT>> s = (Supplier<Spliterator<E_OUT>>) sourceStage.sourceSupplier;
                sourceStage.sourceSupplier = null;
                return lazySpliterator(s);
            }
            else {
                throw new IllegalStateException(MSG_CONSUMED);
            }
        }
        else {
            return wrap(this, () -> sourceSpliterator(0), isParallel());
        }
    }
1203388
private void linkNodeLast(LinkedHashMapEntry<K,V> p) {
        LinkedHashMapEntry<K,V> last = tail;
        tail = p;
        if (last == null)
            head = p;
        else {
            p.before = last;
            last.after = p;
        }
    }
728750
@Override
	public ControllerLinkBuilder linkTo(Class<?> controller, Object... parameters) {
		return ControllerLinkBuilder.linkTo(controller, parameters);
	}
400415
private void resolve(LinkRelation rel) {
    Iterator<LinkRelationRef> refs = rel.getLinkRelationRefs().iterator();
    while (refs.hasNext()) {
      LinkRelationRef ref = refs.next();
      LinkRelation referencedRel = linkRelations.stream()
          .filter(item -> StringUtils.equals(item.getRel(), ref.getRel()))
          .findFirst().orElse(null);
      if (referencedRel == null) {
        refs.remove();
      }
      else {
        if (StringUtils.isBlank(ref.getShortDescription())) {
          ref.setShortDescription(referencedRel.getShortDescription());
        }
      }
    }
  }
47289
@SuppressWarnings("unchecked")
	public OGraphEdge link(final OGraphVertex iTargetVertex, final String iClassName) {
		if (iTargetVertex == null)
			throw new IllegalArgumentException("Missed the target vertex");

		// CREATE THE EDGE BETWEEN ME AND THE TARGET
		final OGraphEdge edge = new OGraphEdge(database, iClassName, this, iTargetVertex);
		getOutEdges().add(edge);

		Set<ODocument> recordEdges = ((Set<ODocument>) document.field(OGraphDatabase.VERTEX_FIELD_OUT));
		if (recordEdges == null) {
			recordEdges = new HashSet<ODocument>();
			document.field(OGraphDatabase.VERTEX_FIELD_OUT, recordEdges);
		}
		recordEdges.add(edge.getDocument());
		document.setDirty();

		// INSERT INTO THE INGOING EDGES OF TARGET
		iTargetVertex.getInEdges().add(edge);

		recordEdges = ((Set<ODocument>) iTargetVertex.getDocument().field(OGraphDatabase.VERTEX_FIELD_IN));
		if (recordEdges == null) {
			recordEdges = new HashSet<ODocument>();
			iTargetVertex.getDocument().field(OGraphDatabase.VERTEX_FIELD_IN, recordEdges);
		}

		recordEdges.add(edge.getDocument());
		iTargetVertex.getDocument().setDirty();

		return edge;
	}
580979
def linkage(self):
        """"""
        if not hasattr(self, '_linkage'):
            self._linkage = conf.lib.clang_getCursorLinkage(self)

        return LinkageKind.from_id(self._linkage)
1247877
private void writeLinkOptions(final String baseDir, final PropertyWriter writer, final TargetInfo linkTarget)
      throws SAXException {
    if (linkTarget != null) {
      final ProcessorConfiguration config = linkTarget.getConfiguration();
      if (config instanceof CommandLineLinkerConfiguration) {
        final CommandLineLinkerConfiguration linkConfig = (CommandLineLinkerConfiguration) config;

        if (linkConfig.getLinker() instanceof BorlandLinker) {
          final String linkID = "win32.Debug_Build.win32b.ilink32";
          writeIlinkArgs(writer, linkID, linkConfig.getPreArguments());
          writeIlinkArgs(writer, linkID, linkConfig.getEndArguments());
          writer.write(linkID, "param.libfiles.1", "cw32mt.lib");
          writer.write(linkID, "param.libfiles.2", "import32.lib");
          int libIndex = 3;
          final String[] libNames = linkConfig.getLibraryNames();
          for (final String libName : libNames) {
            writer.write(linkID, "param.libfiles." + libIndex++, libName);
          }
          final String startup = linkConfig.getStartupObject();
          if (startup != null) {
            writer.write(linkID, "param.objfiles.1", startup);
          }
        } else {
          final String linkID = "linux.Debug_Build.gnuc++.g++link";
          writeLdArgs(writer, linkID, linkConfig.getPreArguments());
          writeLdArgs(writer, linkID, linkConfig.getEndArguments());
        }
      }
    }
  }