goProject/trunk/center/common/webserver/reflectMethod.go

41 lines
850 B
Go
Raw Normal View History

2025-01-06 16:01:02 +08:00
package webServer
import (
"reflect"
)
// methodAndInOutTypes
2025-01-23 16:12:49 +08:00
//
// @description: 反射的方法和输入、输出参数类型组合类型
2025-01-06 16:01:02 +08:00
type methodAndInOutTypes struct {
// 反射出来的对应方法对象
Method reflect.Value
// 反射出来的方法的输入参数的类型集合
InTypes []reflect.Type
// 反射出来的方法的输出参数的类型集合
OutTypes []reflect.Type
}
// newmethodAndInOutTypes
2025-01-23 16:12:49 +08:00
//
// @description: newmethodAndInOutTypes
//
2025-01-06 16:01:02 +08:00
// parameter:
2025-01-23 16:12:49 +08:00
//
2025-01-06 16:01:02 +08:00
// @_method: _method
// @_inTypes: _inTypes
// @_outTypes: _outTypes
2025-01-23 16:12:49 +08:00
//
2025-01-06 16:01:02 +08:00
// return:
2025-01-23 16:12:49 +08:00
//
2025-01-06 16:01:02 +08:00
// @*methodAndInOutTypes: methodAndInOutTypes
func newmethodAndInOutTypes(_method reflect.Value, _inTypes []reflect.Type, _outTypes []reflect.Type) *methodAndInOutTypes {
return &methodAndInOutTypes{
Method: _method,
InTypes: _inTypes,
OutTypes: _outTypes,
}
}