public class AttributeUtil
extends java.lang.Object
Constructor and Description |
---|
AttributeUtil() |
Modifier and Type | Method and Description |
---|---|
static java.util.Collection |
getClassesWithAttributeType(java.util.Collection classes,
java.lang.Class attributeClass)
Filters a Collection of
Class objects. |
static java.util.Collection |
getObjectsWithAttributeType(java.util.Collection objects,
java.lang.Class attributeClass)
Filters a collection of objects.
|
public static java.util.Collection getClassesWithAttributeType(java.util.Collection classes, java.lang.Class attributeClass)
Class
objects. The returned collection
only contains those classes that have an attribute of the specified type.
That is, for each Class clazz in the
returned collection,
clazz != null && Attributes.hasAttributeType (clazz, attributeClass)
is true.classes
- Collection of Classes to filter. May contain null
references,
but may not itself be null
.attributeClass
- the class to filter based on.public static java.util.Collection getObjectsWithAttributeType(java.util.Collection objects, java.lang.Class attributeClass)
o != null && Attributes.hasAttributeType (o.getClass (), attributeClass)
is true.objects
- Collection of objects to filter. May contain null
references,
but may not itself be null
.attributeClass
- the class to filter based on.