object

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2024 License: GPL-3.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopy

func DeepCopy(src, dst interface{})

DeepCopy 深拷贝对象

func GetKind

func GetKind(v interface{}) reflect.Kind

GetKind 获取类型

func GetLengthOfCollection

func GetLengthOfCollection(item interface{}) (length int)

GetLengthOfCollection 获取集合的长度

func GetType

func GetType(v interface{}) reflect.Type

GetType 获取类型

func GetTypeEx

func GetTypeEx(v interface{}, getUnderlyingType bool) reflect.Type

GetTypeEx 获取类型

func GetUnderlyingType

func GetUnderlyingType(t reflect.Type) reflect.Type

GetUnderlyingType 获取底层类型

func GetValue

func GetValue(v interface{}) reflect.Value

GetValue 获取值

func New

func New(t reflect.Type) interface{}

New 根据类型创建新的对象(返回值为新对象的地址)

func NewEx

func NewEx(t reflect.Type, byUnderlyingType bool) interface{}

NewEx 根据类型的底层类型创建新的对象(返回值为新对象的地址)

Types

type Object

type Object struct {
	// contains filtered or unexported fields
}

Object 对象类

func NewObject

func NewObject(t reflect.Type) *Object

NewObject 根据类型创建新的对象(返回值为新对象的地址)

func NewObjectEx

func NewObjectEx(t reflect.Type, byUnderlyingType bool) *Object

NewObjectEx 根据类型的底层类型创建新的对象(返回值为新对象的地址)

func (*Object) GetKind

func (o *Object) GetKind() reflect.Kind

GetKind 获取类型

func (*Object) GetType

func (o *Object) GetType() reflect.Type

GetType 获取类型

func (*Object) GetUnderlyingType

func (o *Object) GetUnderlyingType() reflect.Type

GetUnderlyingType 获取底层类型

func (*Object) GetValue

func (o *Object) GetValue() reflect.Value

GetValue 获取值

func (*Object) Interface

func (o *Object) Interface() interface{}

Interface 获取接口

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL