code: public static Class<? extends XAttribute> getType(XAttribute attribute) {
  		if (attribute instanceof XAttributeList) {
  			return XAttributeList.class;
  		} else if (attribute instanceof XAttributeContainer) {
  			return XAttributeContainer.class;
  		} else if (attribute instanceof XAttributeLiteral) {
  			return XAttributeLiteral.class;
  		} else if (attribute instanceof XAttributeBoolean) {
  			return XAttributeBoolean.class;
  		} else if (attribute instanceof XAttributeContinuous) {
  			return XAttributeContinuous.class;
  		} else if (attribute instanceof XAttributeDiscrete) {
  			return XAttributeDiscrete.class;
  		} else if (attribute instanceof XAttributeTimestamp) {
  			return XAttributeTimestamp.class;
  		} else if (attribute instanceof XAttributeID) {
  			return XAttributeID.class;
  		} else {
  			throw new AssertionError("Unexpected attribute type!");
  		}
  	}
docs: For the given attribute, returns its type, i.e., the most high-level,
  typed interface this attribute implements.
  
  @param attribute
  Attribute to analyze.
  @return High-level type interface of this attribute.