/*
(non-Javadoc)

@see org.apache.myfaces.view.facelets.tag.TagDecorator#decorate(org.apache.myfaces.view.facelets.tag.Tag)
773302
public Tag decorate(Tag tag)
    {
        if (XHTML_NAMESPACE.equals(tag.getNamespace()))
        {
            String n = tag.getLocalName();
            if ("a".equals(n))
            {
                return new Tag(tag.getLocation(), HtmlLibrary.NAMESPACE, "commandLink", tag.getQName(), tag
                        .getAttributes());
            }
            if ("form".equals(n))
            {
                return new Tag(tag.getLocation(), HtmlLibrary.NAMESPACE, "form", tag.getQName(), tag.getAttributes());
            }
            if ("input".equals(n))
            {
                TagAttribute attr = tag.getAttributes().get("type");
                if (attr != null)
                {
                    String t = attr.getValue();
                    TagAttributes na = removeType(tag.getAttributes());
                    if ("text".equals(t))
                    {
                        return new Tag(tag.getLocation(), HtmlLibrary.NAMESPACE, "inputText", tag.getQName(), na);
                    }
                    if ("password".equals(t))
                    {
                        return new Tag(tag.getLocation(), HtmlLibrary.NAMESPACE, "inputSecret", tag.getQName(), na);
                    }
                    if ("hidden".equals(t))
                    {
                        return new Tag(tag.getLocation(), HtmlLibrary.NAMESPACE, "inputHidden", tag.getQName(), na);
                    }
                    if ("submit".equals(t))
                    {
                        return new Tag(tag.getLocation(), HtmlLibrary.NAMESPACE, "commandButton", tag.getQName(), na);
                    }
                }
            }
        }
        return null;
    }
390793
private void storeTagAnnotation(Annotation anno) {
        Class<? extends Annotation> annoType = anno.annotationType();
        Annotation[] tags = annoType.getAnnotations();
        for (Annotation tag : tags) {
            Class<? extends Annotation> tagType = tag.annotationType();
            if (WAIVE_TAG_TYPES.contains(tagType)) {
                continue;
            }
            Set<Annotation> tagged = tagAnnotations.get(tagType);
            if (null == tagged) {
                tagged = new HashSet<>();
                tagAnnotations.put(tagType, tagged);
            }
            tagged.add(anno);
        }
    }
539451
@SuppressWarnings("deprecation")
	@Override
	public void decorateRequest(HttpServletRequest request) throws IOException {

		request.setAttribute(CACHEBUST_REQATTRNAME, getParameter(request, CACHEBUST_REQPARAMS));

		// Get module lists from request
		RequestedModuleNames requestedModuleNames = setRequestedModuleNames(request);

		// Get the feature list, if any
		request.setAttribute(FEATUREMAP_REQATTRNAME, getFeaturesFromRequest(request, requestedModuleNames.isVersionError()));

		request.setAttribute(OPTIMIZATIONLEVEL_REQATTRNAME, getOptimizationLevelFromRequest(request));

		String value = getParameter(request, EXPANDREQUIRELISTS_REQPARAMS);
		if ("log".equals(value)) { //$NON-NLS-1$
			request.setAttribute(EXPANDREQLOGGING_REQATTRNAME, Boolean.TRUE);
			request.setAttribute(EXPANDREQUIRELISTS_REQATTRNAME, Boolean.TRUE);
		} else {
			request.setAttribute(EXPANDREQUIRELISTS_REQATTRNAME, TypeUtil.asBoolean(value));
		}
		request.setAttribute(DEPENDENCYEXPANSIONLOGGING_REQATTRNAME, TypeUtil.asBoolean(getParameter(request, DEPENDENCYEXPANSIONLOGGING_REQPARAMS)));

		boolean exportModuleNamesDefault = requestedModuleNames.getPreloads().isEmpty() &&
				                           requestedModuleNames.getDeps().isEmpty();
		request.setAttribute(EXPORTMODULENAMES_REQATTRNAME, TypeUtil.asBoolean(getParameter(request, EXPORTMODULENAMES_REQPARAMS), exportModuleNamesDefault));

		request.setAttribute(SHOWFILENAMES_REQATTRNAME, TypeUtil.asBoolean(getParameter(request, SHOWFILENAMES_REQPARAMS)));

		request.setAttribute(NOCACHE_REQATTRNAME, TypeUtil.asBoolean(getParameter(request, NOCACHE_REQPARAMS)));

		request.setAttribute(REQUESTEDLOCALES_REQATTRNAME, getRequestedLocales(request));

		request.setAttribute(INCLUDEREQUIREDEPS_REQATTRNAME, getParameter(request, INCLUDEREQUIREDEPS_REQPARAM));

		request.setAttribute(INCLUDEUNDEFINEDFEATUREDEPS_REQATTRNAME, getParameter(request, INCLUDEUNDEFINEDFEATUREDEPS_REQPARAM));

		request.setAttribute(ASSERTNONLS_REQATTRNAME, getParameter(request, ASSERTNONLS_REQPARAM));

		request.setAttribute(SERVEREXPANDLAYERS_REQATTRNAME, TypeUtil.asBoolean(getParameter(request, SERVEREXPANDLAYERS_REQPARAMS)));

		request.setAttribute(GENERATESOURCEMAPS_REQATTRNAME, TypeUtil.asBoolean(getParameter(request, GENERATESOURCEMAPS_REQPARAMS)));

		if (request.getParameter(CONFIGVARNAME_REQPARAM) != null) {
			request.setAttribute(CONFIGVARNAME_REQATTRNAME, request.getParameter(CONFIGVARNAME_REQPARAM));
		} else if (getAggregator().getConfig().getProperty(CONFIGVARNAME_REQPARAM, String.class) != null) {
			request.setAttribute(CONFIGVARNAME_REQATTRNAME, getAggregator().getConfig().getProperty(CONFIGVARNAME_REQPARAM, String.class).toString());
		}

		// SERVEREXPANDPLAYERS takes precedence over EXPANDREQUIRELISTS
		if (TypeUtil.asBoolean(request.getAttribute(SERVEREXPANDLAYERS_REQATTRNAME))) {
			request.removeAttribute(EXPANDREQUIRELISTS_REQATTRNAME);
		}
	}
1257261
public static void addAnnotation(JVar field, JAnnotationUse annotation) {
		List<JAnnotationUse> annotations = getPrivateField(field, "annotations");
		annotations.add(annotation);
	}
1092920
public BeanDefinitionHolder decorate(Node source,
                                         BeanDefinitionHolder holder,
                                         ParserContext context) {

        String beanName = holder.getBeanName();
        BeanDefinitionRegistry registry = context.getRegistry();
        registerPerformanceMonitor(beanName, registry);
        registerInterceptor(source, beanName, registry);

        return holder;
    }
1061585
private void decorate(final String id, final String caption, final String style, final String styleName,
            final boolean required, final String data) {
        // Default settings
        setRequired(required);
        addStyleName(ValoTheme.CHECKBOX_SMALL);
        if (id != null) {
            setId(id);
        }
        if (caption != null) {
            setCaption(caption);
        }
        // Add style
        if (style != null) {
            setStyleName(style);
        }
        // Add style Name
        if (styleName != null) {
            addStyleName(styleName);
        }
        // Set Data
        if (data != null) {
            setData(data);
        }
    }
1071435
private void addTagHandlerInMapByTagger(Class<? extends IConditHandler> cls, Tagger tagger) {
        AbstractZealotConfig.getTagHandlerMap()
                .put(tagger.value(), new TagHandler(tagger.prefix(), cls, tagger.symbol()));
    }
872408
@SuppressWarnings("unchecked")
    public T addTag(String tag) {
        if (this.tags_ == null) {
            tags_ = new ArrayList<>();
        }
        this.tags_.add(tag);
        return (T) this;
    }
890911
public static void addDevelopmentAttributes(FeatureDescriptor descriptor, 
            FaceletContext ctx, TagAttribute displayName, TagAttribute shortDescription, 
            TagAttribute expert, TagAttribute hidden, TagAttribute preferred)
    {
        if (displayName != null)
        {
            descriptor.setDisplayName(displayName.getValue(ctx));
        }
        if (shortDescription != null)
        {
            descriptor.setShortDescription(shortDescription.getValue(ctx));
        }
        if (expert != null)
        {
            descriptor.setExpert(expert.getBoolean(ctx));
        }
        if (hidden != null)
        {
            descriptor.setHidden(hidden.getBoolean(ctx));
        }
        if (preferred != null)
        {
            descriptor.setPreferred(preferred.getBoolean(ctx));
        }
    }
725428
@Override
  public synchronized Repository<Entity> decorate(Repository<Entity> repository) {
    String entityTypeId = repository.getEntityType().getId();

    if (!entityTypeId.equals(DECORATOR_CONFIGURATION) && bootstrappingDone) {
      DecoratorConfiguration config =
          dataService
              .query(DECORATOR_CONFIGURATION, DecoratorConfiguration.class)
              .eq(ENTITY_TYPE_ID, entityTypeId)
              .findOne();

      if (config != null) {
        repository = decorateRepository(repository, config);
      }
    }

    return repository;
  }
1158444
@Deprecated
	@Override
	public void setTag(final String tag) {
		ComponentModel model = getOrCreateComponentModel();
		model.setTag(tag);
	}
1273512
public Builder tag(String tag) {
        ends.push("</" + tag + ">");
        html.a('<').a(tag).a('>');
        return this;
    }
414706
public void putTag(Tag tag, String value) {
    if (value != null) {
      mValues.put(tag, sanitizeString(value));
    }
  }
943832
public void setAddTags(java.util.Collection<Tag> addTags) {
        if (addTags == null) {
            this.addTags = null;
            return;
        }

        this.addTags = new java.util.ArrayList<Tag>(addTags);
    }
1145922
public function decorate(string $className, callable $decorate): void
    {
        $this->config->registerClassDecorator($className, $decorate);
    }
43719
def onTagDel(self, name, func):
        '''
        

        '''
        if '*' in name:
            self.ontagdelglobs.add(name, func)
        else:
            self.ontagdels[name].append(func)
127090
public void removeTaggedComponent(final String tag) {
		TemplateModel model = getOrCreateComponentModel();
		if (model.taggedComponents != null) {
			WComponent component = model.taggedComponents.remove(tag);
			if (model.taggedComponents.isEmpty()) {
				model.taggedComponents = null;
			}
			if (component != null) {
				remove(component);
			}
		}
	}