## org.w3c.tools.resources
Class AttributeRegistry

    java.lang.Object
      |
      +--org.w3c.tools.resources.AttributeRegistry

public class AttributeRegistry
extends java.lang.Object

Constructor Summary
`AttributeRegistry()`

Method Summary
`static java.lang.Class` | `getAttributeClass(java.lang.Class cls, java.lang.String attrname)` Get the name of the class that has declared this attribute.
`static Attribute[]` | `getClassAttributes(java.lang.Class cls)` Get this class declared attributes.
`static int` | `registerAttribute(java.lang.Class cls, Attribute attr)` Register a new attribute for a given class.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AttributeRegistry

    public AttributeRegistry()

Method Detail

### registerAttribute

    public static int registerAttribute(java.lang.Class cls,
                                        Attribute attr)

  Register a new attribute for a given class. This method create the approrpriate attribute description record if required, and return the index of this attribute in the corresponding holder instances.
  Parameters:
    `cls` - The class that defines this attribute.
    `attr` - The attribute to declare.
  Returns:
    The attribute index.

### getClassAttributes

    public static Attribute[] getClassAttributes(java.lang.Class cls)

  Get this class declared attributes.
  Parameters:
    `cls` - The class we are querying.
  Returns:
    An array of Attribute instances, describing each of the attributes of all instances of the class, or null if the class hasn't defined any attributes.

### getAttributeClass

    public static java.lang.Class getAttributeClass(java.lang.Class cls,
                                                    java.lang.String attrname)

  Get the name of the class that has declared this attribute.
  Parameters:
    `cls` - The class that makes the starting point of lookup.
    `attr` - The attribute we are looking for.
  Returns:
    The name of the class that defined that attribute, or null.