public class GetEntityFunction extends java.lang.Object implements EntityMethodFunction
GetEntity
annotation. It will resolve an
GetEntityMethod
to be used by the entity typing system.EntityContainer.getEntity(UUID)()
.
@GetEntity
Entity getGhost(UUID id);
@EntityID
@GetEntity
Entity getGhost();
The next example signatures will resolve to EntityContainer.getOptEntity(UUID)
.
@GetEntity
Optional<Entity>
getGhost(UUID id);
@EntityID
@GetEntity
Optional<Entity>
getGhost();
The next example signatures will resolve to EntityContainer.getEntityAsType(UUID, Class)
.
@GetEntity
Ghost getGhost(UUID id);
@EntityID
@GetEntity
Ghost getGhost();
The next example signatures will resolve to
EntityContainer.getOptEntityAsType(UUID, Class)
.
@GetEntity
Optional<Ghost>
getGhost(UUID id);
@EntityID
@GetEntity
Optional<Ghost>
getGhost();
NOTE: This function will throw exceptions if GetEntity
is present but the method
signature is invalid.DefaultEntityProxyFactory
Constructor and Description |
---|
GetEntityFunction() |
Modifier and Type | Method and Description |
---|---|
GetEntityMethod |
apply(java.lang.reflect.Method m) |
public GetEntityMethod apply(java.lang.reflect.Method m)
apply
in interface java.util.function.Function<java.lang.reflect.Method,EntityMethod>