Class Attributes.Synthetic
java.lang.Object
org.eclipse.jetty.util.Attributes.Wrapper
org.eclipse.jetty.util.Attributes.Synthetic
- All Implemented Interfaces:
 Attributes
- Direct Known Subclasses:
 ServletAttributes, ServletAttributes
- Enclosing interface:
 Attributes
An abstract implementation of 
Attributes.Wrapper that provides a mechanism
for synthetic attributes that can be modified or deleted.  A synthetic attribute
is one whose value is not stored in the normal map backing the Attributes instance,
but is instead calculated as needed. Modifications to synthetic attributes are maintained
in a separate layer and no modifications are made to the backing Attributes.
Non-synthetic attributes are handled normally by the backing Attributes
Uses of this class must provide implementations for
getSyntheticNameSet() amd getSyntheticAttribute(String).
- 
Nested Class Summary
Nested classes/interfaces inherited from interface Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.Synthetic, Attributes.Wrapper - 
Field Summary
FieldsFields inherited from interface Attributes
NULL - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidClear all attribute namesgetAttribute(String name) Get an attribute by name.Get the immutable set of attribute names.protected abstract ObjectgetSyntheticAttribute(String name) Get the value of a specific synthetic attribute.Get the list of known synthetic attribute names, including those that currently have a null value.removeAttribute(String name) Remove an attributesetAttribute(String name, Object value) Set an attributeMethods inherited from class Attributes.Wrapper
equals, getWrapped, hashCodeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Attributes
asAttributeMap 
- 
Field Details
- 
REMOVED
 
 - 
 - 
Constructor Details
- 
Synthetic
 
 - 
 - 
Method Details
- 
getSyntheticAttribute
 - 
getSyntheticNameSet
 - 
getAttribute
Description copied from interface:AttributesGet an attribute by name. Some attributes may be "hidden" attributes, in that they are only found by an explicit call togetAttribute(String)and they do not otherwise appear inAttributes.getAttributeNameSet()orAttributes.asAttributeMap().- Specified by:
 getAttributein interfaceAttributes- Overrides:
 getAttributein classAttributes.Wrapper- Parameters:
 name- the attribute to get- Returns:
 - the value of the attribute, or 
nullif no such attribute exists 
 - 
setAttribute
Description copied from interface:AttributesSet an attribute- Specified by:
 setAttributein interfaceAttributes- Overrides:
 setAttributein classAttributes.Wrapper- Parameters:
 name- the attribute to setvalue- the value to set. A null value is equivalent to removing the attribute.- Returns:
 - the previous value of the attribute if set, else 
null 
 - 
removeAttribute
Description copied from interface:AttributesRemove an attribute- Specified by:
 removeAttributein interfaceAttributes- Overrides:
 removeAttributein classAttributes.Wrapper- Parameters:
 name- the attribute to remove- Returns:
 - the value of the attribute if removed, else 
null 
 - 
getAttributeNameSet
Description copied from interface:AttributesGet the immutable set of attribute names.- Specified by:
 getAttributeNameSetin interfaceAttributes- Overrides:
 getAttributeNameSetin classAttributes.Wrapper- Returns:
 - Set of attribute names, or an empty set if there are no attributes.
 
 - 
clearAttributes
public void clearAttributes()Description copied from interface:AttributesClear all attribute names- Specified by:
 clearAttributesin interfaceAttributes- Overrides:
 clearAttributesin classAttributes.Wrapper
 
 -