org.jboss.osgi.metadata
Interface ParameterizedAttribute

All Superinterfaces:
AttributeAware
All Known Subinterfaces:
PackageAttribute

public interface ParameterizedAttribute
extends AttributeAware

Attribute with parameters.

Author:
Ales Justin, Adrian Brock

Method Summary
 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
 
Methods inherited from interface org.jboss.osgi.metadata.AttributeAware
getAttribute
 

Method Detail

getAttributes

Map<String,Parameter> getAttributes()
Get the attributes.

Returns:
the attributes or an empty map

getAttribute

Parameter getAttribute(String name)
Get an attribute by name.

Parameters:
name - attributes's name
Returns:
the attribute

getAttributeValue

<T> T getAttributeValue(String name,
                        Class<T> type)
Get an attribute value

Type Parameters:
T - the expected type
Parameters:
name - the name of the attribute
type - the expected type
Returns:
the attribute value

getAttributeValue

<T> T getAttributeValue(String name,
                        T defaultValue,
                        Class<T> type)
Get a directive value

Type Parameters:
T - the expected type
Parameters:
name - the name of the directive
defaultValue - the default value when no attribute is specified
type - the expected type
Returns:
the attribute value

getDirectives

Map<String,Parameter> getDirectives()
Get the declerations

Returns:
the directives or an empty map

getDirective

Parameter getDirective(String name)
Get a directive by name.

Parameters:
name - directive's name
Returns:
the directive

getDirectiveValue

<T> T getDirectiveValue(String name,
                        Class<T> type)
Get a directive value

Type Parameters:
T - the expected type
Parameters:
name - the name of the directive
type - the expected type
Returns:
the directive value

getDirectiveValue

<T> T getDirectiveValue(String name,
                        T defaultValue,
                        Class<T> type)
Get a directive value

Type Parameters:
T - the expected type
Parameters:
name - the name of the directive
defaultValue - the default value when no directive is specified
type - the expected type
Returns:
the directive value


Copyright © 2010. All Rights Reserved.