/* (non-Javadoc)
@see javax.management.DynamicMBean#getAttributes(java.lang.String[])
188209
public AttributeList getAttributes(String[] attributes) {
    final AttributeList result = new AttributeList();
    for (String attributeName : attributes) {
      result.add(new Attribute(attributeName, getAttributeInternal(attributeName)));
    }
    return result;
  }
497053
public GetContactAttributesResult withAttributes(java.util.Map<String, String> attributes) {
        setAttributes(attributes);
        return this;
    }
398802
@Override
    public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
436657
protected Map<String, String> getElementAttributes() {
        // Preserve order of attributes
        Map<String, String> attrs = new HashMap<>();

        if (this.getUrl() != null) {
            attrs.put("url", this.getUrl().toString());
        }
        if (this.getMethod() != null) {
            attrs.put("method", this.getMethod().toString());
        }
        if (this.getReservationSid() != null) {
            attrs.put("reservationSid", this.getReservationSid());
        }
        if (this.getPostWorkActivitySid() != null) {
            attrs.put("postWorkActivitySid", this.getPostWorkActivitySid());
        }

        return attrs;
    }
810437
public GetSMSAttributesResult withAttributes(java.util.Map<String, String> attributes) {
        setAttributes(attributes);
        return this;
    }
1278306
public Enumeration getAttributeNames()
    {
        if (_attributes==null)
            return Collections.enumeration(Collections.EMPTY_LIST);
        return Collections.enumeration(_attributes.keySet());
    }
1026913
public MBeanAttributeInfo[] getAttributes() {
    final List<MBeanAttributeInfo> attributes = new ArrayList<MBeanAttributeInfo>();
    for (int i = 1; i <= reportable.getMaxEntriesToKeep(); i++) {
      attributes.add(new MBeanAttributeInfo(Integer.toString(i), "String", "Value number " + i + " in history", true,
          false, false));
    }
    return attributes.toArray(new MBeanAttributeInfo[attributes.size()]);
  }
952916
public Map<String, Attribute> getAttributes() {
        Map<String, Attribute> result = new HashMap<>();
        DataSourceAttribute datasourceAttribute = new DataSourceAttribute();
        Map<String, Attribute> dsResult = new HashMap<>();
        dsResult.put(MAP_KEY, this.mapAttribute);
        datasourceAttribute.setAttributes(dsResult);
        result.put("datasource", datasourceAttribute);
        return result;
    }
353797
@Override
    public Object[] getAttributeValues(String key) {
        if (userAttributes == null) {
            return null;
        }

        final List<Object> values = userAttributes.get(key);
        if (values != null) {
            return values.toArray();
        }

        return null;
    }
901966
public static Iterable<String> getAttributeNames(Iterable<Attribute> attrs) {
    return () -> stream(attrs).map(Attribute::getName).iterator();
  }
529185
public static Map<String, Object> getRequestParameters(final Collection<String> attributes, final HttpServletRequest context) {
        return attributes.stream()
            .filter(a -> StringUtils.isNotBlank(context.getParameter(a)))
            .map(m -> {
                val values = context.getParameterValues(m);
                val valuesSet = new LinkedHashSet<Object>();
                if (values != null && values.length > 0) {
                    Arrays.stream(values).forEach(v -> valuesSet.addAll(Arrays.stream(v.split(" ")).collect(Collectors.toSet())));
                }
                return Pair.of(m, valuesSet);
            })
            .collect(Collectors.toMap(Pair::getKey, Pair::getValue));
    }
823336
@Override
    public String getAttribute(final String name) {
        String value;
        value = hash.get(name);
        return value;
    }
989785
public Map<Object, Object> getAttributes() {

        if (null == attributes) {
            attributes = new HashMap<Object,Object>();
        }
        return attributes;

    }
653136
public List<Attribute> getAttributes(String domain, String beanName, String[] attributes) throws Exception {
		checkClientConnected();
		return getAttributes(ObjectNameUtil.makeObjectName(domain, beanName), attributes);
	}
314107
public Collection<String> listAttributeNames() {
        List<String> list = new ArrayList<String>();
        try {
            MBeanAttributeInfo[] attrs = beanInfo.getAttributes();
            for (MBeanAttributeInfo attr : attrs) {
                list.add(attr.getName());
            }
        } catch (Exception e) {
            throwException("Could not list attribute names. Reason: ", e);
        }
        return list;
    }
444798
public Object getAttribute(String name)
    {
        if (_attributes==null)
            return null;
        return _attributes.get(name);
    }
1221224
public static synchronized List<Object> getAttributes(final String name) {
		final List<Object> data = new ArrayList<>();

		for (final String id : SESSIONS.keySet()) {
			final HttpSession session = SESSIONS.get(id);
			try {
				final Object o = session.getAttribute(name);
				data.add(o);
				//CHECKSTYLE:OFF
			} catch (final Exception e) {
				// no data for this object.
			}
			//CHECKSTYLE:ON
		}

		return data;
	}