spel

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type EvaluationContext

type EvaluationContext interface {
	SetVariable(var1 string, var2 map[string]interface{})

	SetVariables(var2 map[string]interface{})

	LookupVariable(name string) interface{}

	GetPropertyAccessors() []PropertyAccessor
}

参数赋值 MAP

type ExpressionState

type ExpressionState struct {
	RelatedContext EvaluationContext

	RootObject TypedValue

	ContextObjects list.List

	VariableScopes list.List
}

根据KEY获取MAP的value

func (*ExpressionState) GetActiveContextObject

func (this *ExpressionState) GetActiveContextObject() TypedValue

func (*ExpressionState) GetEvaluationContext

func (this *ExpressionState) GetEvaluationContext() EvaluationContext

func (*ExpressionState) GetRootContextObject

func (this *ExpressionState) GetRootContextObject() TypedValue

func (*ExpressionState) LookupVariable

func (this *ExpressionState) LookupVariable(name string) TypedValue

func (*ExpressionState) PopActiveContextObject

func (this *ExpressionState) PopActiveContextObject()

func (*ExpressionState) PopActiveContextObjectNull

func (this *ExpressionState) PopActiveContextObjectNull()

func (*ExpressionState) PushActiveContextObject

func (this *ExpressionState) PushActiveContextObject(obj TypedValue)

type MapAccessor

type MapAccessor struct {
}

func (MapAccessor) CanRead

func (this MapAccessor) CanRead(context EvaluationContext, target interface{}, name string) bool

func (MapAccessor) GetSpecificTargetClasses

func (this MapAccessor) GetSpecificTargetClasses() interface{}

func (MapAccessor) Read

func (this MapAccessor) Read(context EvaluationContext, target interface{}, name string) TypedValue

type PropertyAccessor

type PropertyAccessor interface {
	CanRead(context EvaluationContext, target interface{}, name string) bool

	Read(context EvaluationContext, target interface{}, name string) TypedValue

	GetSpecificTargetClasses() interface{}
}

寄存器

type ReflectivePropertyAccessor

type ReflectivePropertyAccessor struct {
}

反射处理字段

func (ReflectivePropertyAccessor) CanRead

func (this ReflectivePropertyAccessor) CanRead(context EvaluationContext, target interface{}, name string) bool

func (ReflectivePropertyAccessor) GetSpecificTargetClasses

func (this ReflectivePropertyAccessor) GetSpecificTargetClasses() interface{}

func (ReflectivePropertyAccessor) Read

func (this ReflectivePropertyAccessor) Read(context EvaluationContext, target interface{}, name string) TypedValue

type ResolvableType

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

type SpelParserConfiguration

type SpelParserConfiguration struct {
}

type StandardEvaluationContext

type StandardEvaluationContext struct {
	Variables map[string]interface{}
	// contains filtered or unexported fields
}

map存储

func (*StandardEvaluationContext) AddBeforeDefault

func (this *StandardEvaluationContext) AddBeforeDefault(resolvers []PropertyAccessor, resolver PropertyAccessor)

func (*StandardEvaluationContext) AddPropertyAccessor

func (this *StandardEvaluationContext) AddPropertyAccessor(resolver PropertyAccessor)

func (StandardEvaluationContext) GetPropertyAccessors

func (this StandardEvaluationContext) GetPropertyAccessors() []PropertyAccessor

func (StandardEvaluationContext) LookupVariable

func (this StandardEvaluationContext) LookupVariable(name string) interface{}

func (*StandardEvaluationContext) SetVariable

func (this *StandardEvaluationContext) SetVariable(var1 string, var2 map[string]interface{})

func (*StandardEvaluationContext) SetVariables

func (this *StandardEvaluationContext) SetVariables(var2 map[string]interface{})

type TypeDescriptor

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

func (TypeDescriptor) ForObject

func (this TypeDescriptor) ForObject(source interface{}) (TypeDescriptor, error)

type TypedValue

type TypedValue struct {
	Value interface{}
	// contains filtered or unexported fields
}

func (TypedValue) GetTypeDescriptor

func (this TypedValue) GetTypeDescriptor() TypeDescriptor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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