public class SpecificationFactory
extends java.lang.Object
Requirements and getting instances of PokemonSpecifications| Constructor and Description |
|---|
SpecificationFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <A,B> Specification<A,B> |
create(java.lang.Class<? extends Specification<A,B>> clazz,
java.lang.Object... args)
Creates a
PokemonSpecification instance from the args by converting them to String for the given Specification |
static <A,B> Specification<A,B> |
create(java.lang.Class<? extends Specification<A,B>> clazz,
java.lang.String... specs)
Creates a
PokemonSpecification instance from a string array for the given Specification |
static Specification<?,?> |
empty()
Gets the empty
Specification |
static <A,B> Specification<A,B> |
fromNbt(java.lang.Class<? extends Specification<A,B>> clazz,
net.minecraft.nbt.NBTTagCompound nbt)
Creates a
Specification implementation from given item NBTTagCompound |
static java.lang.String[] |
getRequirementNames(java.lang.Class<? extends Specification<?,?>> clazz)
Gets all requirement names in the given
Specification |
static <A,B,C extends Specification<A,B>> |
register(java.lang.Class<C> clazz,
Requirement<A,B,?> requirement)
Register a new
Requirement for the given Specification |
static <A,B> java.util.List<Requirement<A,B,?>> |
requirements(java.lang.Class<? extends Specification<A,B>> specification,
java.lang.String spec)
Gets the list of
Requirements created from the given spec for the specified Specification |
public static <A,B,C extends Specification<A,B>> void register(java.lang.Class<C> clazz, Requirement<A,B,?> requirement)
Requirement for the given Specificationclazz - The type being registered underrequirement - The requirement being registeredpublic static <A,B> java.util.List<Requirement<A,B,?>> requirements(java.lang.Class<? extends Specification<A,B>> specification, java.lang.String spec)
Requirements created from the given spec for the specified Specificationspecification - The typespec - The spec being parsedpublic static <A,B> Specification<A,B> create(java.lang.Class<? extends Specification<A,B>> clazz, java.lang.String... specs)
PokemonSpecification instance from a string array for the given Specificationclazz - The typespecs - The specs being parsedpublic static <A,B> Specification<A,B> create(java.lang.Class<? extends Specification<A,B>> clazz, java.lang.Object... args)
PokemonSpecification instance from the args by converting them to String for the given Specificationclazz - The typeargs - Args being convertedpublic static Specification<?,?> empty()
Specificationpublic static java.lang.String[] getRequirementNames(java.lang.Class<? extends Specification<?,?>> clazz)
Specificationclazz - The typepublic static <A,B> Specification<A,B> fromNbt(java.lang.Class<? extends Specification<A,B>> clazz, net.minecraft.nbt.NBTTagCompound nbt)
Specification implementation from given item NBTTagCompoundA - The reforged typeB - The minecraft typeclazz - The typenbt - The NBT data