public final class SpongeDataRegistry extends Object implements org.spongepowered.api.data.manipulator.DataManipulatorRegistry
Modifier and Type | Method and Description |
---|---|
static void |
finalizeRegistration() |
<E> Optional<ValueProcessor<E,? extends org.spongepowered.api.data.value.BaseValue<E>>> |
getBaseValueProcessor(org.spongepowered.api.data.key.Key<? extends org.spongepowered.api.data.value.BaseValue<E>> key) |
<T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> |
getBuilder(Class<T> manipulatorClass) |
<T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> |
getBuilderForImmutable(Class<I> immutableManipulatorClass) |
<T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> |
getImmutableProcessor(Class<I> immutableClass)
Gets the
DataProcessor for the ImmutableDataManipulator
class. |
static SpongeDataRegistry |
getInstance() |
<T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> |
getProcessor(Class<T> mutableClass)
Gets the
DataProcessorDelegate for the provided
DataManipulator class. |
<E,V extends org.spongepowered.api.data.value.BaseValue<E>> |
getValueProcessor(org.spongepowered.api.data.key.Key<V> key) |
Optional<org.spongepowered.api.data.manipulator.DataManipulatorBuilder<?,?>> |
getWildBuilderForImmutable(Class<? extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> immutable) |
Optional<DataProcessor> |
getWildDataProcessor(Class<? extends org.spongepowered.api.data.manipulator.DataManipulator> class1)
Gets the raw typed
DataProcessor with no type generics. |
Optional<DataProcessor> |
getWildImmutableProcessor(Class<? extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> immutableClass)
Gets the raw typed
DataProcessor for the
ImmutableDataManipulator class. |
Optional<DataProcessor<?,?>> |
getWildProcessor(Class<? extends org.spongepowered.api.data.manipulator.DataManipulator<?,?>> mutableClass)
Gets a wildcarded typed
DataProcessor for the provided
DataManipulator class. |
Optional<ValueProcessor<?,?>> |
getWildValueProcessor(org.spongepowered.api.data.key.Key<?> key) |
<T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> |
register(Class<? extends T> manipulatorClass,
Class<? extends I> immutableManipulatorClass,
org.spongepowered.api.data.manipulator.DataManipulatorBuilder<T,I> builder) |
<T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> |
registerDataProcessorAndImpl(Class<T> manipulatorClass,
Class<? extends T> implClass,
Class<I> immutableDataManipulator,
Class<? extends I> implImClass,
DataProcessor<T,I> processor)
Registers a
DataManipulator class and the
ImmutableDataManipulator class along with the implemented
classes such that the processor is meant to handle the implementations
for those specific classes. |
<E,V extends org.spongepowered.api.data.value.BaseValue<E>> |
registerValueProcessor(org.spongepowered.api.data.key.Key<V> key,
ValueProcessor<E,V> valueProcessor) |
public static SpongeDataRegistry getInstance()
public static void finalizeRegistration()
public <T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> void register(Class<? extends T> manipulatorClass, Class<? extends I> immutableManipulatorClass, org.spongepowered.api.data.manipulator.DataManipulatorBuilder<T,I> builder)
register
in interface org.spongepowered.api.data.manipulator.DataManipulatorRegistry
public <T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> Optional<org.spongepowered.api.data.manipulator.DataManipulatorBuilder<T,I>> getBuilder(Class<T> manipulatorClass)
getBuilder
in interface org.spongepowered.api.data.manipulator.DataManipulatorRegistry
public <T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> Optional<org.spongepowered.api.data.manipulator.DataManipulatorBuilder<T,I>> getBuilderForImmutable(Class<I> immutableManipulatorClass)
getBuilderForImmutable
in interface org.spongepowered.api.data.manipulator.DataManipulatorRegistry
public Optional<org.spongepowered.api.data.manipulator.DataManipulatorBuilder<?,?>> getWildBuilderForImmutable(Class<? extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> immutable)
public <T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> void registerDataProcessorAndImpl(Class<T> manipulatorClass, Class<? extends T> implClass, Class<I> immutableDataManipulator, Class<? extends I> implImClass, DataProcessor<T,I> processor)
DataManipulator
class and the
ImmutableDataManipulator
class along with the implemented
classes such that the processor is meant to handle the implementations
for those specific classes.T
- The type of data manipulatorI
- The type of immutable data manipulatormanipulatorClass
- The manipulator classimplClass
- The implemented manipulator classimmutableDataManipulator
- The immutable classimplImClass
- The implemented immutable classprocessor
- The processorpublic <T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> Optional<DataProcessor<T,I>> getProcessor(Class<T> mutableClass)
DataProcessorDelegate
for the provided
DataManipulator
class.T
- The type of data manipulatorI
- The type of immutable data manipulatormutableClass
- The class of the data manipulatorpublic Optional<DataProcessor<?,?>> getWildProcessor(Class<? extends org.spongepowered.api.data.manipulator.DataManipulator<?,?>> mutableClass)
DataProcessor
for the provided
DataManipulator
class. This is primarily useful when the
type information is not known (due to type erasure).mutableClass
- The mutable classpublic Optional<DataProcessor> getWildDataProcessor(Class<? extends org.spongepowered.api.data.manipulator.DataManipulator> class1)
DataProcessor
with no type generics.class1
- The class of the DataManipulator
public <T extends org.spongepowered.api.data.manipulator.DataManipulator<T,I>,I extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<I,T>> Optional<DataProcessor<T,I>> getImmutableProcessor(Class<I> immutableClass)
DataProcessor
for the ImmutableDataManipulator
class.T
- The type of DataManipulatorI
- The type of ImmutableDataManipulatorimmutableClass
- The immutable data manipulator classpublic Optional<DataProcessor> getWildImmutableProcessor(Class<? extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> immutableClass)
DataProcessor
for the
ImmutableDataManipulator
class.immutableClass
- The immutable data manipulator classpublic <E,V extends org.spongepowered.api.data.value.BaseValue<E>> void registerValueProcessor(org.spongepowered.api.data.key.Key<V> key, ValueProcessor<E,V> valueProcessor)
public <E,V extends org.spongepowered.api.data.value.BaseValue<E>> Optional<ValueProcessor<E,V>> getValueProcessor(org.spongepowered.api.data.key.Key<V> key)
public Optional<ValueProcessor<?,?>> getWildValueProcessor(org.spongepowered.api.data.key.Key<?> key)
public <E> Optional<ValueProcessor<E,? extends org.spongepowered.api.data.value.BaseValue<E>>> getBaseValueProcessor(org.spongepowered.api.data.key.Key<? extends org.spongepowered.api.data.value.BaseValue<E>> key)