@Immutable
public interface EnrichableMessageContext
extends io.spine.base.MessageContext
Modifier and Type | Method and Description |
---|---|
default <E extends com.google.protobuf.Message> |
find(java.lang.Class<E> cls) |
default <E extends com.google.protobuf.Message> |
get(java.lang.Class<E> cls)
Obtains enrichment of the passed class.
|
io.spine.core.Enrichment |
getEnrichment()
Obtains an instance of
Enrichment from the context of the message. |
equals, getParserForType, hashCode, newBuilderForType, toBuilder, toString
getSerializedSize, toByteArray, toByteString, writeDelimitedTo, writeTo, writeTo
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
io.spine.core.Enrichment getEnrichment()
Enrichment
from the context of the message.default <E extends com.google.protobuf.Message> java.util.Optional<E> find(java.lang.Class<E> cls)
default <E extends com.google.protobuf.Message> E get(java.lang.Class<E> cls)
java.lang.IllegalStateException
- if the enrichment is not found