Module com.aoapps.lang
Package com.aoapps.lang.attribute
package com.aoapps.lang.attribute
Utilities for working with various attribute scopes.
This API has four concepts:
Scope
- The most broad concept is scope. Does not yet have a resolved context or attribute name.Context
- A specifically resolved context. Does not yet have an attribute name.Attribute
- An attribute has both context and name and is used for value access.Attribute.Name
- A name without any specific scope or context.
Ultimately, the goal is to get to an attribute, which means having both a fully resolved context and a name. The
API supports arriving at an attribute in any order, such as scope → context → name
or
name → context
.
- Author:
- AO Industries, Inc.
-
ClassDescriptionAttribute<C,
T> An attribute has scope, context, and name and is used for value access.A name without any specific scope or context.Supports attributes in extensible contexts, loaded viaServiceLoader.load(java.lang.Class)
on each access toAttribute.Name.context(java.lang.Object)
.Supports scope attributes in extensible scopes, loaded viaServiceLoader.load(java.lang.Class)
on each access toAttribute.Name.scope(java.lang.Class)
.A backup value from before attribute initialization, which must beclosed
to restore the old value.Context<C>A specifically resolved context.Scope<C>The most broad concept is scope.Scope.Attribute<C,T> Attribute
: Has scope and name, still needs context.