public class SpecificationFactory
extends java.lang.Object
Requirement
s and getting instances of PokemonSpecification
sConstructor 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
Requirement s 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 Specification
clazz
- 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)
Requirement
s created from the given spec for the specified Specification
specification
- 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 Specification
clazz
- 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 Specification
clazz
- The typeargs
- Args being convertedpublic static Specification<?,?> empty()
Specification
public static java.lang.String[] getRequirementNames(java.lang.Class<? extends Specification<?,?>> clazz)
Specification
clazz
- 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 NBTTagCompound
A
- The reforged typeB
- The minecraft typeclazz
- The typenbt
- The NBT data