public class XAttributeUtils
extends java.lang.Object
Constructor and Description |
---|
XAttributeUtils() |
Modifier and Type | Method and Description |
---|---|
static XAttribute |
composeAttribute(XFactory factory,
java.lang.String key,
java.lang.String value,
java.lang.String type,
XExtension extension)
Composes the appropriate attribute type from the string-based information
found, e.g., in XML serializations.
|
static XAttribute |
derivePrototype(XAttribute instance)
Derives a prototype for the given attribute.
|
static java.util.Set<XExtension> |
extractExtensions(java.util.Map<java.lang.String,XAttribute> attributeMap)
Static helper method for extracting all extensions from an attribute map.
|
static java.lang.Class<? extends XAttribute> |
getType(XAttribute attribute)
For the given attribute, returns its type, i.e., the most high-level,
typed interface this attribute implements.
|
static java.lang.String |
getTypeString(XAttribute attribute)
For the given attribute, derives the standardized string describing the
attributes specific type (used, e.g., for serialization).
|
public static java.lang.Class<? extends XAttribute> getType(XAttribute attribute)
attribute
- Attribute to analyze.public static java.lang.String getTypeString(XAttribute attribute)
attribute
- Attribute to extract type string from.public static XAttribute derivePrototype(XAttribute instance)
instance
- Attribute to derive prototype from.public static XAttribute composeAttribute(XFactory factory, java.lang.String key, java.lang.String value, java.lang.String type, XExtension extension)
factory
- Factory to use for creating the attribute.key
- Key of the attribute.value
- Value of the attribute.type
- Type string of the attribute.extension
- Extension of the attribute (can be null
).public static java.util.Set<XExtension> extractExtensions(java.util.Map<java.lang.String,XAttribute> attributeMap)
attributeMap
- The attribute map from which to extract extensions.