TType
- The specific type.public interface EquivalentConverter<TType>
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getGeneric(java.lang.Class<?> genericType,
TType specific)
Retrieve a copy of the generic type from a specific type.
|
TType |
getSpecific(java.lang.Object generic)
Retrieve a copy of the specific type using an instance of the generic type.
|
java.lang.Class<TType> |
getSpecificType()
Due to type erasion, we need to explicitly keep a reference to the specific type.
|
TType getSpecific(java.lang.Object generic)
This is usually a wrapper type in the Bukkit API.
generic
- - the generic type.java.lang.Object getGeneric(java.lang.Class<?> genericType, TType specific)
This is usually a native net.minecraft.server type in Minecraft.
genericType
- - class or super class of the generic type.specific
- - the specific type we need to copy.java.lang.Class<TType> getSpecificType()