This is a method function for
StreamEntities annotation. It will resolve an
StreamEntitiesMethod to be used by the entity typing system. This differs from the usual
streaming of
Entity as it also lets you stream a subset of
Entity using
EntityID (so adding to any method will cause it to filter).
The next example signature will resolve to
EntityContainer.streamEntities().
@StreamEntities
Stream<Entity> streamGhosts();
The next example signature will resolve to
EntityContainer.streamEntitiesOfType(Class).
@StreamEntities
Stream<Ghost> streamGhosts();
The next example signature will resolve to
EntityContainer.streamEntitiesAsType(Class).
@StreamEntities(ofType = false)
Stream<Ghost> streamGhosts();
The next example signature will show how to use one of the above examples with a subset.
@EntityID(mostSigBits = 0, leastSigBits = 1)
@EntityID(mostSigBits = 0, leastSigBits = 2)
@EntityID(mostSigBits = 0, leastSigBits = 3)
@EntityID(mostSigBits = 0, leastSigBits = 4)
@EntityID(mostSigBits = 0, leastSigBits = 5)
@StreamEntities
Stream<Ghost> streamGhosts();
NOTE: This function will throw exceptions if
StreamEntities is present but the method
signature is invalid.