public class EntityFunction extends java.lang.Object implements java.util.function.Function<java.lang.reflect.Method,EntityMethod>
Entity type. This can beused by an InvocationHandler to
translate original method calls to the desired EntityMethod.EntityFunctionResolver| Constructor and Description |
|---|
EntityFunction(java.lang.Class<? extends Entity> type,
java.util.Map<java.lang.reflect.Method,EntityMethod> methodMap)
Creates a new entity function with the supplied method mapping.
|
| Modifier and Type | Method and Description |
|---|---|
EntityMethod |
apply(java.lang.reflect.Method m) |
boolean |
equals(java.lang.Object obj) |
java.lang.Class<? extends Entity> |
getType()
Gets the entity type this is for.
|
int |
hashCode() |
public EntityFunction(java.lang.Class<? extends Entity> type, java.util.Map<java.lang.reflect.Method,EntityMethod> methodMap)
type - Entity type this is for.methodMap - Method to entity method mapping.public EntityMethod apply(java.lang.reflect.Method m)
apply in interface java.util.function.Function<java.lang.reflect.Method,EntityMethod>public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.Class<? extends Entity> getType()
public final int hashCode()
hashCode in class java.lang.Object