public abstract class AbstractAttributeAware extends Object implements AttributeAware
AttributeAware
to support custom attributes.Constructor and Description |
---|
AbstractAttributeAware() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsAttribute(String name)
Returns true if there is a value for the given name
|
<T> T |
getAttribute(String name,
Class<T> targetType)
Exposes the value for the given name
|
protected void |
initConfig() |
boolean |
setAttribute(String name,
Object value)
Sets an attribute
|
boolean |
setAttribute(String name,
Object value,
boolean forceOverride)
Sets or updates an attribute
|
public boolean setAttribute(String name, Object value)
setAttribute
in interface AttributeAware
name
- name of the attributevalue
- value of the attribute (null values aren't allowed)public boolean setAttribute(String name, Object value, boolean forceOverride)
setAttribute
in interface AttributeAware
name
- name of the attributevalue
- value of the attributeforceOverride
- flag which indicates if it is permitted to override an existing valuepublic boolean containsAttribute(String name)
containsAttribute
in interface AttributeAware
name
- name of the argument in questionpublic <T> T getAttribute(String name, Class<T> targetType)
getAttribute
in interface AttributeAware
T
- current typename
- name of the attributetargetType
- type of the attributeprotected void initConfig()
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.