/*
(non-Javadoc)

@see org.apache.myfaces.view.facelets.tag.TagLibrary#createTagHandler(java.lang.String, java.lang.String,
org.apache.myfaces.view.facelets.tag.TagConfig)
421946
public TagHandler createTagHandler(String ns, String localName, TagConfig tag) throws FacesException
    {
        if (containsNamespace(ns))
        {
            TagHandlerFactory f = _factories.get(localName);
            if (f != null)
            {
                return f.createHandler(tag);
            }
        }
        
        return null;
    }
965529
protected Validator createValidator(FaceletContext ctx)
    {
        if (this.validatorId == null)
        {
            throw new TagException(
                                   this.tag,
                                   "Default behavior invoked of requiring a validator-id passed in the "
                                   + "constructor, must override ValidateHandler(ValidatorConfig)");
        }
        return ctx.getFacesContext().getApplication().createValidator(this.validatorId);
    }
1079144
public static PreparedStatement createTagTable(Connection connection, String tagTableName) throws SQLException {
        // PostgreSQL and H2 will automatically create an index on TAG_KEY,TAG_VALUE when UNIQUE constraint is set
        try (Statement stmt = connection.createStatement()) {
            // PostgreSQL and H2 will automatically create an index on TAG_KEY,TAG_VALUE when UNIQUE constraint is set
            stmt.execute("CREATE TABLE " + tagTableName + "(ID_TAG SERIAL PRIMARY KEY, TAG_KEY VARCHAR UNIQUE);");
        }
        //We return the prepared statement of the tag table
        return connection.prepareStatement("INSERT INTO " + tagTableName + " (TAG_KEY) VALUES (?)");
    }
1098466
public Datapoint addTag(String tagKey, String tagValue) {
        initialTags();
        tags.put(tagKey, tagValue);
        return this;
    }
34386
public static <T extends Annotation> MethodInvokeProxy proxyByAnnotationTag(Object target,String tag,Object ...args)
	{
		Method m=findMethodByAnnotationTag(target,tag);
		if(m!=null)
		{
			return new MethodInvokeProxy(target, m, args);
		}
		return null;
	}
985673
public Tag getOrCreateTag(String tagName, boolean isRef)
    {
        if (null == tagName)
            throw new IllegalArgumentException("Looking for a null tag name.");
        tagName = Tag.normalizeName(tagName);

        synchronized (this.definedTags)
        {
            if (definedTags.containsKey(tagName))
                return definedTags.get(tagName);
            else
            {
                final Tag tag = new Tag(tagName);
                definedTags.put(tagName, tag);
                return tag;
            }
        }
    }
1367086
@Override
	protected MarkupElement onComponentTag(ComponentTag tag)
			throws ParseException {
		if (tag == null) {
			return tag;
		}

		// Only xml tags not already identified as Wicket components will be
		// considered for autolinking. This is because it is assumed that Wicket
		// components like images or all other kind of Wicket Links will handle
		// it themselves.
		// Subclass analyzeAutolinkCondition() to implement you own
		// implementation and register the new tag handler with the markup
		// parser through Application.newMarkupParser().
		if (analyzeAutolinkCondition(tag) == true) {
			// Just a dummy name. The ComponentTag will not be forwarded.
			tag.setId(AUTOLINK_ID);
			tag.setAutoComponentTag(true);
			tag.setModified(true);
			return tag;
		}

		return tag;
	}
428037
public TagHandler getHandler(Tag tag) {
        if (handlers.containsKey(tag.getName())) {
            return handlers.get(tag.getName());
        }
        return null;
    }
585636
public static <T> TaggedValue<T> taggedValue(String tag, T rep) {
        return new TaggedValueImpl<T>(tag, rep);
    }
435413
public Tag create(String name) {
        String url = WxEndpoint.get("url.tag.create");
        TagWrapper tag = new TagWrapper(name);
        String json = JsonMapper.nonEmptyMapper().toJson(tag);
        logger.debug("create tag: {}", json);
        String response = wxClient.post(url, json);
        TagWrapper wrapper = JsonMapper.defaultMapper().fromJson(response, TagWrapper.class);
        return wrapper.getTag();
    }
58879
void addTag(StringBuilder resultString, String tagName, String tagValue) {
		resultString.append(" ");
		resultString.append(sanitizeString(tagName));
		resultString.append("=");
		resultString.append(sanitizeString(tagValue));
	}
1273225
protected Converter createConverter(FaceletContext ctx)
    {
        if (_delegate.getConverterId(ctx) == null)
        {
            throw new TagException(_delegate.getTag(),
                                    "Default behavior invoked of requiring a converter-id passed in the "
                                    + "constructor, must override ConvertHandler(ConverterConfig)");
        }
        return ctx.getFacesContext().getApplication().createConverter(_delegate.getConverterId(ctx));
    }
346258
@Override
    public java.util.concurrent.Future<TagQueueResult> tagQueueAsync(String queueUrl, java.util.Map<String, String> tags,
            com.amazonaws.handlers.AsyncHandler<TagQueueRequest, TagQueueResult> asyncHandler) {

        return tagQueueAsync(new TagQueueRequest().withQueueUrl(queueUrl).withTags(tags), asyncHandler);
    }
1035073
public <R extends Request<T>> R addMarker(String tag, Object... args) {
        Marker marker = new Marker(tag,
                Thread.currentThread().getId(),
                Thread.currentThread().getName(),
                System.nanoTime());

        synchronized (markerListeners) {
            for (RequestListener.MarkerListener markerListener : markerListeners) {
                markerListener.onMarker(marker, args);
            }
        }

        if (logSlowRequests && requestBirthTime == 0) {
            requestBirthTime = System.nanoTime();
        }

        return (R) this;
    }
305808
public TagType<TldTaglibType<T>> getOrCreateTag()
   {
      List<Node> nodeList = childNode.get("tag");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new TagTypeImpl<TldTaglibType<T>>(this, "tag", childNode, nodeList.get(0));
      }
      return createTag();
   }
897642
static void addTagToBuilder(Tag tag, TagMapBuilderImpl builder) {
    builder.put(tag.getKey(), tag.getValue(), tag.getTagMetadata());
  }
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();
  }