goProject/.svn/pristine/0a/0a5860746a4b445d18be34fff4f29b1e4b180b35.svn-base
2025-01-06 16:21:36 +08:00

42 lines
1.1 KiB
Plaintext

// ************************************
// @package: handleMgr
// @description: 反射类-反射的方法和输入、输出参数类型组合类型
// @author:
// @revision history:
// @create date: 2022-02-23 16:33:43
// ************************************
package handleMgr
import (
"reflect"
)
// ReflectMethod 反射的方法和输入、输出参数类型组合类型
type ReflectMethod struct {
// 反射出来的对应方法对象
Method reflect.Value
// 反射出来的方法的输入参数的类型集合
InTypes []reflect.Type
// 反射出来的方法的输出参数的类型集合
OutTypes []reflect.Type
}
// NewReflectMethod
// @description:创建反射的方法和输入、输出参数类型组合类型
// parameter:
// @_method:反射出来的对应方法对象
// @_inTypes:反射出来的方法的输入参数的类型集合
// @_outTypes:反射出来的方法的输出参数的类型集合
// return:
// @*ReflectMethod:
func NewReflectMethod(_method reflect.Value, _inTypes []reflect.Type, _outTypes []reflect.Type) *ReflectMethod {
return &ReflectMethod{
Method: _method,
InTypes: _inTypes,
OutTypes: _outTypes,
}
}