extensions

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IHandler

type IHandler interface {
	ToJniRepresentation(env *jnigi.Env, value any) (*jnigi.ObjectRef, error)
	ToGoRepresentation(env *jnigi.Env, object *jnigi.ObjectRef, dest any) error
}

IHandler is the extension interface that can be used to provide custom handling of objects this will be registered with the BeanExporter when sending and receiving information from java. It is intended to drive the conversion logic between the JNI and go

type InterfaceHandler

type InterfaceHandler interface {
	ToJniRepresentation(env *jnigi.Env, elementType string, value any) (*jnigi.ObjectRef, error)
	ToGoRepresentation(env *jnigi.Env, object *jnigi.ObjectRef, dest any) error
}

InterfaceHandler is the extension interface that will be used to translate to and from JNI representations of an object that is defined by an interface. An example would be a list, a set, or a map

type MockIHandler

type MockIHandler struct {
	mock.Mock
}

MockIHandler is an autogenerated mock type for the IHandler type

func NewMockIHandler

func NewMockIHandler(t mockConstructorTestingTNewMockIHandler) *MockIHandler

NewMockIHandler creates a new instance of MockIHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockIHandler) ToGoRepresentation

func (_m *MockIHandler) ToGoRepresentation(env *jnigi.Env, object *jnigi.ObjectRef, dest interface{}) error

ToGoRepresentation provides a mock function with given fields: env, object, dest

func (*MockIHandler) ToJniRepresentation

func (_m *MockIHandler) ToJniRepresentation(env *jnigi.Env, value interface{}) (*jnigi.ObjectRef, error)

ToJniRepresentation provides a mock function with given fields: env, value

type MockInterfaceHandler

type MockInterfaceHandler struct {
	mock.Mock
}

MockInterfaceHandler is an autogenerated mock type for the InterfaceHandler type

func NewMockInterfaceHandler

func NewMockInterfaceHandler(t mockConstructorTestingTNewMockInterfaceHandler) *MockInterfaceHandler

NewMockInterfaceHandler creates a new instance of MockInterfaceHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockInterfaceHandler) ToGoRepresentation

func (_m *MockInterfaceHandler) ToGoRepresentation(env *jnigi.Env, object *jnigi.ObjectRef, dest interface{}) error

ToGoRepresentation provides a mock function with given fields: env, object, dest

func (*MockInterfaceHandler) ToJniRepresentation

func (_m *MockInterfaceHandler) ToJniRepresentation(env *jnigi.Env, elementType string, value interface{}) (*jnigi.ObjectRef, error)

ToJniRepresentation provides a mock function with given fields: env, elementType, value

Jump to

Keyboard shortcuts

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