of
Creates a new attribute of the given name with the given type. There's no guarantee that subsequent calls to this method with the same attributes would either return the same instance or different instances of Attribute, so consumers are required to compare the attributes with the equals method.
Return
an attribute with the given name and type
Parameters
the name of the attribute
the class of the attribute
the type of the attribute
Creates a new attribute of the given type, inferring the name of the attribute from the simple type name. This method is useful when there's supposedly only one attribute of a specific type in a container, so there's no need to distinguish by name (but the returned type doesn't enforce it_. There's no guarantee that subsequent calls to this method with the same attributes would either return the same instance or different instances of Attribute, so consumers are required to compare the attributes with the equals method.
Return
an attribute with the given name and type
Parameters
the class of the attribute
the type of the attribute