Documentation ¶
Overview ¶
Package signature defines types representing interface and method signatures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MethodNames ¶
MethodNames returns a sorted list of all method names from x.
Types ¶
type Interface ¶
type Interface struct { Name string PkgPath string Doc string Embeds []Embed // No special ordering. Methods []Method // Ordered by method name. }
Interface describes the signature of an interface.
func CleanInterfaces ¶
CleanInterfaces returns a cleaned version of sig. Duplicate interfaces are merged, duplicate embeds and methods are dropped, and all methods are sorted by name.
func CopyInterface ¶
CopyInterface returns a deep copy of x.
func CopyInterfaces ¶
CopyInterfaces returns a deep copy of x.
func (*Interface) FindMethod ¶
FindMethod returns the signature of the method with the given name and true iff the method exists, otherwise returns an empty signature and false.
func (Interface) VDLReflect ¶
type Method ¶
type Method struct { Name string Doc string InArgs []Arg // Input arguments OutArgs []Arg // Output arguments InStream *Arg // Input stream (optional) OutStream *Arg // Output stream (optional) Tags []*vdl.Value // Method tags }
Method describes the signature of an interface method.
func FirstMethod ¶
FirstMethod returns the signature of the method with the given name and true iff the method exists, otherwise returns an empty signature and false. If the method exists in more than one interface, we return the method from the the first interface with the given method name.
func (Method) VDLReflect ¶
type SortableMethods ¶
type SortableMethods []Method
SortableMethods implements sort.Interface, ordering by method name.
func (SortableMethods) Len ¶
func (s SortableMethods) Len() int
func (SortableMethods) Less ¶
func (s SortableMethods) Less(i, j int) bool
func (SortableMethods) Swap ¶
func (s SortableMethods) Swap(i, j int)