Overridden to fetch constructor even if tag is not mapped.
761770
@Override
  protected Construct getConstructor(Node node) {
    Construct construct = super.getConstructor(node);
    logger.trace("getting constructor for node {} Tag {} = {}", new Object[] {node, node.getTag(), construct});
    if(construct instanceof ConstructYamlObject && !tagsDefined.contains(node.getTag())) {
      try {
        node.getTag().getClassName();
      } catch(YAMLException e) {
        node.setUseClassConstructor(true);
        String value = null;
        if(node.getNodeId() == NodeId.scalar) {
          value = ((ScalarNode)node).getValue();
        }
        node.setTag(resolver.resolve(node.getNodeId(), value, true));
        construct = super.getConstructor(node);
        try {
          resolveType(node);
        } catch (ClassNotFoundException e1) {
          logger.debug("Could not find class.", e1);
        }
      }
    }
    
    logger.trace("returning constructor for node {} type {} Tag {} = {}", new Object[] {node, node.getType(), node.getTag(), construct});
    return construct;
  }
1053044
private Content getInheritedTagletOutput(boolean isNonTypeParams, Doc holder,
            TagletWriter writer, Object[] formalParameters,
            Set<String> alreadyDocumented) {
        Content result = writer.getOutputInstance();
        if ((! alreadyDocumented.contains(null)) &&
                holder instanceof MethodDoc) {
            for (int i = 0; i < formalParameters.length; i++) {
                if (alreadyDocumented.contains(String.valueOf(i))) {
                    continue;
                }
                //This parameter does not have any @param documentation.
                //Try to inherit it.
                DocFinder.Output inheritedDoc =
                    DocFinder.search(new DocFinder.Input((MethodDoc) holder, this,
                        String.valueOf(i), ! isNonTypeParams));
                if (inheritedDoc.inlineTags != null &&
                        inheritedDoc.inlineTags.length > 0) {
                    result.addContent(
                        processParamTag(isNonTypeParams, writer,
                            (ParamTag) inheritedDoc.holderTag,
                            isNonTypeParams ?
                                ((Parameter) formalParameters[i]).name():
                                ((TypeVariable) formalParameters[i]).typeName(),
                            alreadyDocumented.size() == 0));
                }
                alreadyDocumented.add(String.valueOf(i));
            }
        }
        return result;
    }
20731
public static Element getAncestor(Element element, Tag tag) {

        if ((element == null) || (tag == null)) {
            return null;
        }
        if (element.getTagName().equalsIgnoreCase(tag.name())) {
            return element;
        }
        if (element.getTagName().equalsIgnoreCase(Tag.body.name())) {
            return null;
        }
        return getAncestor(element.getParentElement(), tag);
    }
1232951
@SuppressWarnings("unchecked")
  public <T extends Tag<?>> List<T> getTags(Class<T> tagClass) {
    List<T> matches = new LinkedList<T>();
    Iterator<Tag<?>> tagIter = _tags.iterator();
    while (tagIter.hasNext()) {
      Tag<?> tag = tagIter.next();
      if (tagClass.isInstance(tag)) {
        matches.add((T)tag);
      }
    }
    return matches;
  }
462158
private static <T> Extension<T> parseBinderExtensionElement(Element element) {

        @SuppressWarnings("unchecked")
		Class<T> providerClass = (Class<T>)lookupClass(element.getAttribute("class"));
        
        Class<?> implementationClass = lookupClass(element.getAttribute("implementationClass"));

        if (providerClass == null) {
            throw new IllegalStateException("Referenced class {" + element.getAttribute("class")
                    + "} could not be found");
        }
        if (implementationClass == null) {
            throw new IllegalStateException("Referenced implementation class {" + element.getAttribute("implementationClass")
                    + "} could not be found");
        }
        if (providerClass.isAssignableFrom(implementationClass)) {
            throw new IllegalStateException("Referenced class {" + element.getAttribute("class")
                    + "} did not implement BindingProvider");
        }

		try {
			@SuppressWarnings("unchecked")
			final Class<? extends T> myImplementationClass = (Class<T>) implementationClass.newInstance();
			return new Extension<T>(providerClass, myImplementationClass);
		} catch (InstantiationException e) {
            throw new IllegalStateException("Referenced implementation class {" + element.getAttribute("implementationClass")
                    + "} could not be instantiated");
		} catch (IllegalAccessException e) {
            throw new IllegalStateException("Referenced implementation class {" + element.getAttribute("implementationClass")
                    + "} could not be accessed");
		}
    }
742513
def multi_constructor(loader, tag_suffix, node):
    

    if tag_suffix not in UNCONVERTED_SUFFIXES:
        tag_suffix = "{}{}".format(FN_PREFIX, tag_suffix)

    constructor = None

    if tag_suffix == "Fn::GetAtt":
        constructor = construct_getatt
    elif isinstance(node, yaml.ScalarNode):
        constructor = loader.construct_scalar
    elif isinstance(node, yaml.SequenceNode):
        constructor = loader.construct_sequence
    elif isinstance(node, yaml.MappingNode):
        constructor = loader.construct_mapping
    else:
        raise Exception("Bad tag: !{}".format(tag_suffix))

    return ODict((
        (tag_suffix, constructor(node)),
    ))
408904
private static IErrorReporter getErrorReporter(JspTag tag)
    {
        if (tag instanceof IErrorReporter && ((IErrorReporter) tag).isReporting())
            return (IErrorReporter) tag;

        // check to see if this tag has is an ErrorReporter or has an ErrorReporter as a parent
        IErrorReporter er = (IErrorReporter) SimpleTagSupport.findAncestorWithClass(tag, IErrorReporter.class);
        while (er != null) {
            if (er.isReporting())
                return er;
            er = (IErrorReporter) SimpleTagSupport.findAncestorWithClass((JspTag) er, IErrorReporter.class);
        }
        return null;
    }
356502
public <T extends Tag> T get(String tagName) {
        return (T) this.value.get(tagName);
    }
1336844
function(node, tagName) {
            node = Y.Dom.get(node);
            if (!node) {
                return null;
            }
            var method = function(el) {
                 return el[TAG_NAME] && el[TAG_NAME].toUpperCase() == tagName.toUpperCase();
            };

            return Y.Dom.getAncestorBy(node, method);
        }
17719
public java.lang.String getTagsOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetTags().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
1104066
public static TaggedValue newTaggedValue(Tag tag, Object value) {
        if (tag == null) {
            throw new IllegalArgumentException("tag must not be null");
        }
        return new TaggedValue(tag, value);
    }
885226
public JQMListItem findItemByTag(Object tag) {
        if (tag == null) return null;
        List<JQMListItem> lst = getItems();
        for (JQMListItem i : lst) {
            if (i == null) continue;
            if (tag.equals(i.getTag())) return i;
        }
        return null;
    }
995430
def get_tag(self, tagtype):
        ''' '''
        for tag in self.__tags:
            if tag.tagtype == tagtype:
                return tag
        return None
472876
@SuppressWarnings("unchecked")
	protected <I> I getExtendedBinder(Class<I> cls) {
        return (I) extendedBinders.get(cls);
    }
10275
@DefaultVisibilityForTesting
  static TagsComponent loadTagsComponent(@Nullable ClassLoader classLoader) {
    try {
      // Call Class.forName with literal string name of the class to help shading tools.
      return Provider.createInstance(
          Class.forName(
              "io.opencensus.impl.tags.TagsComponentImpl", /*initialize=*/ true, classLoader),
          TagsComponent.class);
    } catch (ClassNotFoundException e) {
      logger.log(
          Level.FINE,
          "Couldn't load full implementation for TagsComponent, now trying to load lite "
              + "implementation.",
          e);
    }
    try {
      // Call Class.forName with literal string name of the class to help shading tools.
      return Provider.createInstance(
          Class.forName(
              "io.opencensus.impllite.tags.TagsComponentImplLite",
              /*initialize=*/ true,
              classLoader),
          TagsComponent.class);
    } catch (ClassNotFoundException e) {
      logger.log(
          Level.FINE,
          "Couldn't load lite implementation for TagsComponent, now using "
              + "default implementation for TagsComponent.",
          e);
    }
    return NoopTags.newNoopTagsComponent();
  }
306598
public function get($tag, $override = true)
    {
        if (!$this->freeze) {
            throw new AssertionException('Usage of '.__CLASS__.'::get() is only allowed in beforeCompile. Also make sure that '.__CLASS__.' is registered before all extensions which use it.');
        }
        if ($override && isset($this->overrides[$tag])) {
            return $this->overrides[$tag];
        }
        if (!isset($this->tags[$tag])) {
            throw new AssertionException("Tag '$tag' is not registered.");
        }

        return $this->prefixTag($tag);
    }
542052
@Override
  public JsonParser get() {
    if ( parser == null ) {
      if ( content == null ) {
        throw new IllegalStateException("Handle is not yet populated with content");
      }
      try {
        parser = getMapper().getFactory().createParser(content);
      } catch (JsonParseException e) {
        throw new MarkLogicIOException(e);
      } catch (IOException e) {
        throw new MarkLogicIOException(e);
      }
    }
    return parser;
  }