public class AbstractParameterizedAttribute extends AbstractAttributeAware implements ParameterizedAttribute
Modifier and Type | Field and Description |
---|---|
protected Map<String,Parameter> |
attributes |
protected Map<String,Parameter> |
directives |
attribute
Constructor and Description |
---|
AbstractParameterizedAttribute(String attribute,
Map<String,Parameter> attributes,
Map<String,Parameter> directives) |
Modifier and Type | Method and Description |
---|---|
Parameter |
getAttribute(String name)
Get an attribute by name.
|
Map<String,Parameter> |
getAttributes()
Get the attributes.
|
<T> T |
getAttributeValue(String name,
Class<T> type)
Get an attribute value
|
<T> T |
getAttributeValue(String name,
T defaultValue,
Class<T> type)
Get a directive value
|
Parameter |
getDirective(String name)
Get a directive by name.
|
Map<String,Parameter> |
getDirectives()
Get the declerations
|
<T> T |
getDirectiveValue(String name,
Class<T> type)
Get a directive value
|
<T> T |
getDirectiveValue(String name,
T defaultValue,
Class<T> type)
Get a directive value
|
String |
toString() |
getAttribute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttribute
public Map<String,Parameter> getAttributes()
ParameterizedAttribute
getAttributes
in interface ParameterizedAttribute
public Parameter getAttribute(String name)
ParameterizedAttribute
getAttribute
in interface ParameterizedAttribute
name
- attributes's namepublic <T> T getAttributeValue(String name, Class<T> type)
ParameterizedAttribute
getAttributeValue
in interface ParameterizedAttribute
T
- the expected typename
- the name of the attributetype
- the expected typepublic <T> T getAttributeValue(String name, T defaultValue, Class<T> type)
ParameterizedAttribute
getAttributeValue
in interface ParameterizedAttribute
T
- the expected typename
- the name of the directivedefaultValue
- the default value when no attribute is specifiedtype
- the expected typepublic Map<String,Parameter> getDirectives()
ParameterizedAttribute
getDirectives
in interface ParameterizedAttribute
public Parameter getDirective(String name)
ParameterizedAttribute
getDirective
in interface ParameterizedAttribute
name
- directive's namepublic <T> T getDirectiveValue(String name, Class<T> type)
ParameterizedAttribute
getDirectiveValue
in interface ParameterizedAttribute
T
- the expected typename
- the name of the directivetype
- the expected typepublic <T> T getDirectiveValue(String name, T defaultValue, Class<T> type)
ParameterizedAttribute
getDirectiveValue
in interface ParameterizedAttribute
T
- the expected typename
- the name of the directivedefaultValue
- the default value when no directive is specifiedtype
- the expected typeCopyright © 2013 JBoss by Red Hat. All rights reserved.