|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface EntityTypeRegistry
A registry of the entity implementations to be used when creating an entity of a given type. A given implementation can only be associated with one entity type interface.
| Method Summary | ||
|---|---|---|
|
getEntityTypeOf(Class<T> type)
Returns the interface of this entity implementation. |
|
|
getImplementedBy(Class<T> type)
Returns the implementation to be used for the given entity type. |
|
|
registerImplementation(Class<T> type,
Class<? extends T> implClazz)
Registers the implementation to use for a given entity type. |
|
| Method Detail |
|---|
<T extends Entity> Class<? extends T> getImplementedBy(Class<T> type)
D - entity - the DriverDependentEntity to create the EntityDriver for.location - the Location where the DriverDependentEntity is running.
IllegalArgumentException - If no implementation registered, and the given interface is not annotated with ImplementedBy
IllegalStateException - If the given type is not an interface, or if the implementation class is not a concrete class implementing it<T extends Entity> Class<? super T> getEntityTypeOf(Class<T> type)
entity.getEntityType().getName().
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(Class<T> type,
Class<? extends T> implClazz)
IllegalArgumentException - If this implementation has already been registered for a different type
IllegalStateException - If the implClazz is not a concrete class, or does not implement type
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||