Gets the {@link Tagger} for the specified 'implementation'.
190516
@VisibleForTesting
  public static Tagger getTagger(String implementation) {
    if (implementation.equals("impl")) {
      // We can return the global tracer here because if impl is linked the global tracer will be
      // the impl one.
      // TODO(bdrutu): Make everything not be a singleton (disruptor, etc.) and use a new
      // TraceComponentImpl similar to TraceComponentImplLite.
      return tagsComponentImplBase.getTagger();
    } else if (implementation.equals("impl-lite")) {
      return tagsComponentImplLite.getTagger();
    } else {
      throw new RuntimeException("Invalid tagger implementation specified.");
    }
  }
218244
public Tag decorate(Tag tag)
    {
        Tag t = null;
        for (int i = 0; i < this.decorators.length; i++)
        {
            t = this.decorators[i].decorate(tag);
            if (t != null)
            {
                return t;
            }
        }
        return tag;
    }
533868
public void addCustomTag(String classname, JavaFileManager fileManager, String tagletPath) {
        try {
            Class<?> customTagClass = null;
            // construct class loader
            String cpString = null;   // make sure env.class.path defaults to dot

            ClassLoader tagClassLoader;
            if (fileManager != null && fileManager.hasLocation(DocumentationTool.Location.TAGLET_PATH)) {
                tagClassLoader = fileManager.getClassLoader(DocumentationTool.Location.TAGLET_PATH);
            } else {
                // do prepends to get correct ordering
                cpString = appendPath(System.getProperty("env.class.path"), cpString);
                cpString = appendPath(System.getProperty("java.class.path"), cpString);
                cpString = appendPath(tagletPath, cpString);
                tagClassLoader = new URLClassLoader(pathToURLs(cpString));
            }

            customTagClass = tagClassLoader.loadClass(classname);
            Method meth = customTagClass.getMethod("register",
                                                   new Class<?>[] {java.util.Map.class});
            Object[] list = customTags.values().toArray();
            Taglet lastTag = (list != null && list.length > 0)
                ? (Taglet) list[list.length-1] : null;
            meth.invoke(null, new Object[] {customTags});
            list = customTags.values().toArray();
            Object newLastTag = (list != null&& list.length > 0)
                ? list[list.length-1] : null;
            if (lastTag != newLastTag) {
                //New taglets must always be added to the end of the LinkedHashMap.
                //If the current and previous last taglet are not equal, that
                //means a new Taglet has been added.
                message.notice("doclet.Notice_taglet_registered", classname);
                if (newLastTag != null) {
                    checkTaglet(newLastTag);
                }
            }
        } catch (Exception exc) {
            message.error("doclet.Error_taglet_not_registered", exc.getClass().getName(), classname);
        }

    }
619501
private String getTag(final BorderLayoutConstraint constraint) {
		switch (constraint) {
			case EAST:
				return "ui:east";
			case NORTH:
				return "ui:north";
			case SOUTH:
				return "ui:south";
			case WEST:
				return "ui:west";
			case CENTER:

			default:
				return "ui:center";
		}
	}
230533
private Object getValuePopulatedWithTags(final String originalTag, final String stringValue)
    {
        // See if the value is a surrogate key in the tag parser's map that was placed there during preprocessing,
        // and if so, unpack the values retrieved via the key and use those to populate the field
        final Object value = constructFromString(stringValue, getLongName());

        if (TaggedArgument.class.isAssignableFrom(getUnderlyingFieldClass())) {
            // NOTE: this propagates the tag name/attributes to the field BEFORE the value is set
            TaggedArgument taggedArgument = (TaggedArgument) value;
            TaggedArgumentParser.populateArgumentTags(
                    taggedArgument,
                    getLongName(),
                    originalTag);
        } else if (originalTag != null) {
            // a tag was found for a non-taggable argument
            throw new CommandLineException(
                    String.format("The argument: \"%s/%s\" does not accept tags: \"%s\"",
                            getShortName(),
                            getFullName(),
                            originalTag));
        }
        return value;
    }
914939
public static AnnotationScanner getAnnotationScanner()
   {
      if (active != null)
         return active;

      if (defaultImplementation == null)
         throw new IllegalStateException(bundle.noAnnotationScanner());

      return defaultImplementation;
   }
758676
public static Tag getTag(int identifier) {
    Tag t = null;
    try {
      if (instance == null)
        getTiffTags();
    } catch (ReadTagsIOException e) {
      /*Nothing to be shown*/
    }
    if (tagMap.containsKey(identifier))
      t = tagMap.get(identifier);
    return t;
  }
857650
def tagged(self, tag):
    """"""
    return Scm(self.connection, self.developer_connection, self.url, tag=tag)
641284
@JsonIgnore
	public String getIdentifier() {

		String tags = "";

		Map<String, String> sortedTags = new TreeMap<>();
		sortedTags.putAll(getTags());
		if(!sortedTags.isEmpty()) {
			StringBuilder tagListBuffer = new StringBuilder("{");
			for (String tagKey : sortedTags.keySet()) {
				tagListBuffer.append(tagKey).append('=').append(sortedTags.get(tagKey)).append(',');
			}

			tags = tagListBuffer.substring(0, tagListBuffer.length() - 1).concat("}");
		}

		String namespace = getNamespace();
		Object[] params = { namespace == null ? "" : namespace + ":", getScope(), getMetric(), tags };
		String format = "{0}{1}:{2}" + "{3}";

		return MessageFormat.format(format, params);
	}
742902
private Content getInheritedTagletOutput(boolean isParameters, Element holder,
            TagletWriter writer, List<? extends Element> formalParameters,
            Set<String> alreadyDocumented) {
        Utils utils = writer.configuration().utils;
        Content result = writer.getOutputInstance();
        if ((!alreadyDocumented.contains(null)) && utils.isExecutableElement(holder)) {
            for (int i = 0; i < formalParameters.size(); i++) {
                if (alreadyDocumented.contains(String.valueOf(i))) {
                    continue;
                }
                // This parameter does not have any @param documentation.
                // Try to inherit it.
                Input input = new DocFinder.Input(writer.configuration().utils, holder, this,
                        Integer.toString(i), !isParameters);
                DocFinder.Output inheritedDoc = DocFinder.search(writer.configuration(), input);
                if (inheritedDoc.inlineTags != null && !inheritedDoc.inlineTags.isEmpty()) {
                    Element e = formalParameters.get(i);
                    String lname = isParameters
                            ? utils.getSimpleName(e)
                            : utils.getTypeName(e.asType(), false);
                    CommentHelper ch = utils.getCommentHelper(holder);
                    ch.setOverrideElement(inheritedDoc.holder);
                    Content content = processParamTag(holder, isParameters, writer,
                            inheritedDoc.holderTag,
                            lname,
                            alreadyDocumented.isEmpty());
                    result.addContent(content);
                }
                alreadyDocumented.add(String.valueOf(i));
            }
        }
        return result;
    }
567193
public BigInteger getBigInteger() throws IOException {
        if (buffer.read() != DerValue.tag_Integer) {
            throw new IOException("DER input, Integer tag error");
        }
        return buffer.getBigInteger(getLength(buffer), false);
    }
142196
public Tag getTag(Factory f, Position start, Position end) throws TagLibException {
	if (StringUtil.isEmpty(tttCD)) return new TagOther(f, start, end);
	try {
	    return _getTag(f, start, end);
	}
	catch (ClassException e) {
	    throw new TagLibException(e.getMessage());
	}
	catch (NoSuchMethodException e) {
	    throw new TagLibException(e.getMessage());
	}
	catch (Throwable e) {
	    ExceptionUtil.rethrowIfNecessary(e);
	    throw new TagLibException(e);
	}
    }
1048689
public InstructionHandle getLabeledInstruction(String label) {
        PatternElementMatch first = getFirstLabeledMatch(label);
        return first != null ? first.getMatchedInstructionInstructionHandle() : null;
    }
1244137
@Benchmark
  @BenchmarkMode(Mode.AverageTime)
  @OutputTimeUnit(TimeUnit.NANOSECONDS)
  public TagContext getCurrentTagContext(Data data) {
    return data.tagger.getCurrentTagContext();
  }
76978
@javax.annotation.Nullable
  private static TagValue getTagValueForDeprecatedRpcTag(
      Map<? extends TagKey, TagValueWithMetadata> tags, TagKey[] newKeys) {
    for (TagKey newKey : newKeys) {
      TagValueWithMetadata valueWithMetadata = tags.get(newKey);
      if (valueWithMetadata != null) {
        return valueWithMetadata.getTagValue();
      }
    }
    return UNKNOWN_TAG_VALUE;
  }
825725
IntermediateParseResults parseTagsSheet(Repository<Entity> tagRepository) {
    IntermediateParseResults intermediateParseResults =
        new IntermediateParseResults(entityTypeFactory);
    if (tagRepository != null) {
      for (Entity tagEntity : tagRepository) {
        String id = tagEntity.getString(EMX_TAG_IDENTIFIER);
        if (id != null) {
          intermediateParseResults.addTag(id, entityToTag(id, tagEntity));
        }
      }
    }
    return intermediateParseResults;
  }
530905
public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) {
		return getAnnotatedElement().getAnnotation(annotationType);
	}