public interface EntityTypeRegistry
| Modifier and Type | Method and Description |
|---|---|
<T extends Entity> |
getEntityTypeOf(java.lang.Class<T> type)
Returns the interface of this entity implementation.
|
<T extends Entity> |
getImplementedBy(java.lang.Class<T> type)
Returns the implementation to be used for the given entity type.
|
<T extends Entity> |
registerImplementation(java.lang.Class<T> type,
java.lang.Class<? extends T> implClazz)
Registers the implementation to use for a given entity type.
|
<T extends Entity> java.lang.Class<? extends T> getImplementedBy(java.lang.Class<T> type)
D - entity - the DriverDependentEntity to create the EntityDriver for.location - the Location where the DriverDependentEntity is running.java.lang.IllegalArgumentException - If no implementation registered, and the given interface is not annotated with ImplementedByjava.lang.IllegalStateException - If the given type is not an interface, or if the implementation class is not a concrete class implementing it<T extends Entity> java.lang.Class<? super T> getEntityTypeOf(java.lang.Class<T> type)
entity.getEntityType().getName().java.lang.IllegalArgumentException - If no interface is registered against this implementation,
and no super-type of the class is annotated with ImplementedBy to point at the given class<T extends Entity> EntityTypeRegistry registerImplementation(java.lang.Class<T> type, java.lang.Class<? extends T> implClazz)
java.lang.IllegalArgumentException - If this implementation has already been registered for a different typejava.lang.IllegalStateException - If the implClazz is not a concrete class, or does not implement type