F - whatever kind of thing you'd like to map to. Generally this will
be some class or interface representing a function.public interface Protocol<F>
F. Each Protocol is created by a Protocol.Builder.| Modifier and Type | Interface and Description |
|---|---|
static interface |
Protocol.Builder<F>
A single-use builder for Protocol.
|
String name()
F lookup(Class selfClass)
F associated with selfClass.
If the Protocol does not contain a mapping for exactly
selfClass, then try selfClass's supertypes in
C3
linearized order, only returning null
when all sueprtypes have been tried without finding a match.
selfClass may be null, in which case return
the F associated with null. null has no
supertypes, so if no F is associated with null,
return null.
selfClass - find an F for this class. May be null.null.Copyright © 2019. All rights reserved.