reflectfx

package
v0.0.0-...-7b96089 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsObservable

func AsObservable[T any](val reflect.Value) (obsfx2.ObservableValue[T], bool)

func GetPropertyType

func GetPropertyType(typ reflect.Type) reflect.Type

func IsObservable

func IsObservable(typ reflect.Type) bool

func IsObservableList

func IsObservableList(typ reflect.Type) bool

func IsObservableMap

func IsObservableMap(typ reflect.Type) bool

func IsObservableSet

func IsObservableSet(typ reflect.Type) bool

func IsProperty

func IsProperty(typ reflect.Type) bool

Types

type NodeType

type NodeType interface {
	Type() reflect.Type
	ObservableProperties() []ReflectedProperty
	GetProperty(name string) ReflectedProperty
}

func NewReflectedNodeType

func NewReflectedNodeType(typ reflect.Type) NodeType

func Reflect

func Reflect(value interface{}) NodeType

func ReflectType

func ReflectType(typ reflect.Type) NodeType

func ReflectValue

func ReflectValue(value reflect.Value) NodeType

type ReflectedNodeType

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

func (ReflectedNodeType) GetProperty

func (r ReflectedNodeType) GetProperty(name string) ReflectedProperty

func (ReflectedNodeType) ObservableProperties

func (r ReflectedNodeType) ObservableProperties() []ReflectedProperty

func (ReflectedNodeType) Type

func (r ReflectedNodeType) Type() reflect.Type

type ReflectedProperty

type ReflectedProperty interface {
	Name() string
	Type() reflect.Type

	Get(receiver any) obsfx2.IProperty
}

type Value

type Value interface {
	Type() reflect.Type

	GetProperty(name string) (obsfx.IProperty, bool)
	GetProperties() []obsfx.IProperty
}

func ValueOf

func ValueOf(v interface{}) Value

Jump to

Keyboard shortcuts

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