- java.lang.Object
-
- com.aoapps.lang.attribute.Attribute.Name<T>
-
- All Implemented Interfaces:
Serializable
public static class Attribute.Name<T> extends Object implements Serializable
A name without any specific scope or context.Attribute: Has name, still needs scope or context.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAttribute.Name.ContextFactory<C,T>Supports attributes in extensible contexts, loaded viaServiceLoader.load(java.lang.Class)on each access tocontext(java.lang.Object).static interfaceAttribute.Name.ScopeFactory<C,T>Supports scope attributes in extensible scopes, loaded viaServiceLoader.load(java.lang.Class)on each access toscope(java.lang.Class).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C> Attribute<C,T>context(C context)Attribute: Uses the given context and this name.StringgetName()Gets the attribute Name.<C> Scope.Attribute<C,T>scope(Scope<C> scope)Attribute: Uses the given scope and this name, still needs context.<C> Scope.Attribute<C,T>scope(Class<C> contextType)Attribute: Uses the given scope (located by content type) and this name, still needs context.
-
-
-
Field Detail
-
name
protected final String name
-
-
Constructor Detail
-
Name
protected Name(String name)
-
-
Method Detail
-
getName
public String getName()
Gets the attribute Name.
-
scope
public <C> Scope.Attribute<C,T> scope(Class<C> contextType)
Attribute: Uses the given scope (located by content type) and this name, still needs context.Performance: This loads
Attribute.Name.ScopeFactoryviaServiceLoader.load(java.lang.Class)on every call. It is strongly encouraged to use subclass-specific implementations where performance is critical.
-
scope
public <C> Scope.Attribute<C,T> scope(Scope<C> scope)
Attribute: Uses the given scope and this name, still needs context.
-
context
public <C> Attribute<C,T> context(C context)
Attribute: Uses the given context and this name.Performance: This loads
Attribute.Name.ContextFactoryviaServiceLoader.load(java.lang.Class)on every call. It is strongly encouraged to use subclass-specific implementations where performance is critical.
-
-