Class SimpleAttributeProvider
Object
SimpleAttributeProvider
- All Implemented Interfaces:
AttributeLoaderProvider
@Internal
public abstract class SimpleAttributeProvider
extends Object
implements AttributeLoaderProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleAttributeProvidercreate(AttributeLoader<?>... loaders) createAttributeLoader(AttributeSpec<?> spec, AttributeProviderContext context) Creates an attribute loader for the given attribute spec.protected final <T> voidregisterCompositeLoader(AttributeSpec<T> spec, AttributeLoader<T>... loaders) protected final voidregisterLoader(AttributeLoader<?> loader)
-
Constructor Details
-
SimpleAttributeProvider
public SimpleAttributeProvider()
-
-
Method Details
-
create
-
registerLoader
-
registerCompositeLoader
@SafeVarargs protected final <T> void registerCompositeLoader(AttributeSpec<T> spec, AttributeLoader<T>... loaders) -
createAttributeLoader
@Nullable public AttributeLoader<?> createAttributeLoader(@NotNull AttributeSpec<?> spec, @NotNull AttributeProviderContext context) throws StructureProviderException Description copied from interface:AttributeLoaderProviderCreates an attribute loader for the given attribute spec.- Specified by:
createAttributeLoaderin interfaceAttributeLoaderProvider- Parameters:
spec- attribute speccontext- creation context- Returns:
- a loader that can load values for the given spec, or a spec with a different value format;
nullif this provider cannot offer a loader - Throws:
StructureProviderException- if there was a problem creating a loader (the provider will continue being called)
-