On check set attribute.

@param <E>
the element type
@param pluralAttribute
the plural attribute
@param paramClass
the param class
@return true, if successful
183846
private <E> boolean onCheckSetAttribute(PluralAttribute<? super X, ?, ?> pluralAttribute, Class<E> paramClass)
    {
        if (pluralAttribute != null)
        {
            if (isSetAttribute(pluralAttribute) && isBindable(pluralAttribute, paramClass))
            {
                return true;
            }

        }

        return false;
    }
898397
@Override
    public <E> SetAttribute<X, E> getDeclaredSet(String paramName, Class<E> paramClass)
    {
        PluralAttribute<X, ?, ?> declaredAttrib = getDeclaredPluralAttribute(paramName);

        if (onCheckSetAttribute(declaredAttrib, paramClass))
        {
            return (SetAttribute<X, E>) declaredAttrib;
        }
        throw new IllegalArgumentException(
                "attribute of the given name and type is not present in the managed type, for name:" + paramName
                        + " , type:" + paramClass);
    }
101587
public boolean contains(Attribute attr) throws NamingException {
    if (attr == null) {
      return false; // protect
    }

    Attribute recAttr = getAttributes().get(attr.getID());

    if (recAttr == null) {
      return false;
    }

    NamingEnumeration ne = attr.getAll();

    while (ne.hasMore()) {
      if (!recAttr.contains(ne.next())) {
        return false;
      }
    }

    return true;
  }
1327285
private boolean attributeExists(Class<?> aClass,Attribute attribute){
		if(!classExists(aClass))return false;
		for (XmlAttribute xmlAttribute : findXmlClass(aClass).attributes) 
			if(xmlAttribute.name.equals(attribute.getName()))return true;
		
		return false;
	}
994832
@Override
    public <Y> SingularAttribute<X, Y> getDeclaredSingularAttribute(String paramString, Class<Y> paramClass)
    {
        return getDeclaredSingularAttribute(paramString, paramClass, true);
    }
1365695
@Override
	public void setAttribute(int semantics, int offset, int ordinate, int value) {
		setAttribute(semantics, offset, ordinate, (double) value);
	}
164458
public boolean isAttrFlagSet(String name, int flags)
    {
        return (null != m_attrs)
            ? ((m_attrs.getIgnoreCase(name) & flags) != 0)
            : false;
    }
419124
public void set(Object... params) {
        for (int i = 0; i < params.length; i += 2) {
            hashAttributes.put((String) params[i], params[i + 1]);
        }

        if (plugin != null) {
            plugin.invalidate();
        }
    }
837519
protected void setAttributes(FaceletContext ctx, Object instance) {
        if (instance != null) {
            Class type = instance.getClass();
            if (mapper == null || !this.lastType.equals(type)) {
                this.lastType = type;
                this.mapper = this.createMetaRuleset(type).finish();
            }
            this.mapper.applyMetadata(ctx, instance);
        }
    }
164857
protected boolean isSafeAttribute(String tagName, Element el, Attribute attr) {
        TagName tag = TagName.valueOf(tagName);
        AttributeKey key = AttributeKey.valueOf(attr.getKey());

        Set<AttributeKey> okSet = attributes.get(tag);
        if (okSet != null && okSet.contains(key)) {
            if (protocols.containsKey(tag)) {
                Map<AttributeKey, Set<Protocol>> attrProts = protocols.get(tag);
                // ok if not defined protocol; otherwise test
                return !attrProts.containsKey(key) || testValidProtocol(el, attr, attrProts.get(key));
            } else { // attribute found, no protocols defined, so OK
                return true;
            }
        }
        // might be an enforced attribute?
        Map<AttributeKey, AttributeValue> enforcedSet = enforcedAttributes.get(tag);
        if (enforcedSet != null) {
            Attributes expect = getEnforcedAttributes(tagName);
            String attrKey = attr.getKey();
            if (expect.hasKeyIgnoreCase(attrKey)) {
                return expect.getIgnoreCase(attrKey).equals(attr.getValue());
            }
        }
        // no attributes defined for tag, try :all tag
        return !tagName.equals(":all") && isSafeAttribute(":all", el, attr);
    }
748588
private static boolean hasGenerics(Parameter[] param) {
        if (param.length == 0) return false;
        for (Parameter parameter : param) {
            ClassNode type = parameter.getType();
            if (hasGenerics(type)) return true;
        }
        return false;
    }
953165
@Override
   public boolean shouldStyle(Object data, Object element) {
      if (!doStyle()) {
         log.warning(String.format("not styling becasue parameter %s is false. %s, key: %s", DOSTYLE, getClass().getName(), getStyleClass()));
      }
      return doStyle() && super.shouldStyle(data, element);
   }
426498
public static boolean isSetter(String name, Class[] args) {
        if (StringUtils.isEmpty(name) || args == null) {
            return false;
        }
        if (args.length != 1) {
            return false;
        }

        return NameUtils.isSetterName(name);
    }
1312603
public boolean containsPropertySet(Class<? extends Annotation> propertySet)
    {
        // If we have an annotation type instance and it matches up with the requested
        // type, then return true
        if (_annot != null && _annot.getClass().equals(propertySet))
            return true;

        if (_propertySets.contains(propertySet))
            return true;

        //
        // Call up to superclass, for delegation model
        //
        return super.containsPropertySet(propertySet);
    }
642427
private <Y> SingularAttribute<X, Y> getDeclaredSingularAttribute(String paramString, Class<Y> paramClass,
            boolean checkValidity)
    {
        SingularAttribute<X, ?> declaredAttrib = declaredSingluarAttribs.get(paramString);

        if (declaredAttrib != null && declaredAttrib.getBindableJavaType().equals(paramClass))
        {
            return (SingularAttribute<X, Y>) declaredAttrib;
        }

        if (checkValidity)
        {
            throw new IllegalArgumentException(
                    "attribute of the given name and type is not present in the managed type, for name:" + paramString
                            + " , type:" + paramClass);
        }
        return null;
    }
1186539
public boolean isRecursiveAttrSet(ElemAttributeSet attrSet)
  {

    if (null == m_attrSetStack)
    {
      m_attrSetStack = new Stack();
    }

    if (!m_attrSetStack.empty())
    {
      int loc = m_attrSetStack.search(attrSet);

      if (loc > -1)
      {
        return true;
      }
    }

    return false;
  }
1204637
@Override
    public <E> ListAttribute<? super X, E> getList(String paramName, Class<E> paramClass)
    {
        PluralAttribute<X, ?, ?> declaredAttrib = getDeclaredPluralAttribute(paramName);

        if (onCheckListAttribute(declaredAttrib, paramClass))
        {
            return (ListAttribute<X, E>) declaredAttrib;
        }

        PluralAttribute<? super X, ?, ?> superAttrib = getPluralAttriute(paramName);

        if (onCheckListAttribute(superAttrib, paramClass))
        {
            return (ListAttribute<? super X, E>) superAttrib;

        }
        throw new IllegalArgumentException(
                "attribute of the given name and type is not present in the managed type, for name:" + paramName
                        + " , type:" + paramClass);
    }