//go:build !ignore_autogenerated
// +build !ignore_autogenerated

// Code generated by iocli, run 'iocli gen' to re-generate

package panic

import (
	"github.com/alibaba/ioc-golang/aop"
	autowire "github.com/alibaba/ioc-golang/autowire"
	normal "github.com/alibaba/ioc-golang/autowire/normal"
	singleton "github.com/alibaba/ioc-golang/autowire/singleton"
	util "github.com/alibaba/ioc-golang/autowire/util"
)

func init() {
	normal.RegisterStructDescriptor(&autowire.StructDescriptor{
		Factory: func() interface{} {
			return &afterIsCalledAfterPanicTestInterceptor_{}
		},
	})
	afterIsCalledAfterPanicTestInterceptorStructDescriptor := &autowire.StructDescriptor{
		Factory: func() interface{} {
			return &afterIsCalledAfterPanicTestInterceptor{}
		},
		ConstructFunc: func(i interface{}, _ interface{}) (interface{}, error) {
			impl := i.(*afterIsCalledAfterPanicTestInterceptor)
			var constructFunc afterIsCalledAfterPanicTestInterceptorConstructFunc = initAfterIsCalledAfterPanicTestInterceptor
			return constructFunc(impl)
		},
		Metadata: map[string]interface{}{
			"aop":      map[string]interface{}{},
			"autowire": map[string]interface{}{},
		},
	}
	singleton.RegisterStructDescriptor(afterIsCalledAfterPanicTestInterceptorStructDescriptor)
	normal.RegisterStructDescriptor(&autowire.StructDescriptor{
		Factory: func() interface{} {
			return &panicAfterCalledTestSubApp_{}
		},
	})
	panicAfterCalledTestSubAppStructDescriptor := &autowire.StructDescriptor{
		Factory: func() interface{} {
			return &PanicAfterCalledTestSubApp{}
		},
		Metadata: map[string]interface{}{
			"aop":      map[string]interface{}{},
			"autowire": map[string]interface{}{},
		},
	}
	singleton.RegisterStructDescriptor(panicAfterCalledTestSubAppStructDescriptor)
	normal.RegisterStructDescriptor(&autowire.StructDescriptor{
		Factory: func() interface{} {
			return &panicAfterCalledTestApp_{}
		},
	})
	panicAfterCalledTestAppStructDescriptor := &autowire.StructDescriptor{
		Factory: func() interface{} {
			return &PanicAfterCalledTestApp{}
		},
		Metadata: map[string]interface{}{
			"aop":      map[string]interface{}{},
			"autowire": map[string]interface{}{},
		},
	}
	singleton.RegisterStructDescriptor(panicAfterCalledTestAppStructDescriptor)
}

type afterIsCalledAfterPanicTestInterceptorConstructFunc func(impl *afterIsCalledAfterPanicTestInterceptor) (*afterIsCalledAfterPanicTestInterceptor, error)
type afterIsCalledAfterPanicTestInterceptor_ struct {
	GetAfterIsCalledNum_ func() int
	BeforeInvoke_        func(ctx *aop.InvocationContext)
	AfterInvoke_         func(ctx *aop.InvocationContext)
}

func (a *afterIsCalledAfterPanicTestInterceptor_) GetAfterIsCalledNum() int {
	return a.GetAfterIsCalledNum_()
}

func (a *afterIsCalledAfterPanicTestInterceptor_) BeforeInvoke(ctx *aop.InvocationContext) {
	a.BeforeInvoke_(ctx)
}

func (a *afterIsCalledAfterPanicTestInterceptor_) AfterInvoke(ctx *aop.InvocationContext) {
	a.AfterInvoke_(ctx)
}

type panicAfterCalledTestSubApp_ struct {
	RunWithPanic_ func(panicMsg string)
}

func (p *panicAfterCalledTestSubApp_) RunWithPanic(panicMsg string) {
	p.RunWithPanic_(panicMsg)
}

type panicAfterCalledTestApp_ struct {
	RunWithPanic_ func(panicMst string) (result string)
}

func (p *panicAfterCalledTestApp_) RunWithPanic(panicMst string) (result string) {
	return p.RunWithPanic_(panicMst)
}

type afterIsCalledAfterPanicTestInterceptorIOCInterface interface {
	GetAfterIsCalledNum() int
	BeforeInvoke(ctx *aop.InvocationContext)
	AfterInvoke(ctx *aop.InvocationContext)
}

type PanicAfterCalledTestSubAppIOCInterface interface {
	RunWithPanic(panicMsg string)
}

type PanicAfterCalledTestAppIOCInterface interface {
	RunWithPanic(panicMst string) (result string)
}

var _afterIsCalledAfterPanicTestInterceptorSDID string

func GetafterIsCalledAfterPanicTestInterceptorSingleton() (*afterIsCalledAfterPanicTestInterceptor, error) {
	if _afterIsCalledAfterPanicTestInterceptorSDID == "" {
		_afterIsCalledAfterPanicTestInterceptorSDID = util.GetSDIDByStructPtr(new(afterIsCalledAfterPanicTestInterceptor))
	}
	i, err := singleton.GetImpl(_afterIsCalledAfterPanicTestInterceptorSDID, nil)
	if err != nil {
		return nil, err
	}
	impl := i.(*afterIsCalledAfterPanicTestInterceptor)
	return impl, nil
}

func GetafterIsCalledAfterPanicTestInterceptorIOCInterfaceSingleton() (afterIsCalledAfterPanicTestInterceptorIOCInterface, error) {
	if _afterIsCalledAfterPanicTestInterceptorSDID == "" {
		_afterIsCalledAfterPanicTestInterceptorSDID = util.GetSDIDByStructPtr(new(afterIsCalledAfterPanicTestInterceptor))
	}
	i, err := singleton.GetImplWithProxy(_afterIsCalledAfterPanicTestInterceptorSDID, nil)
	if err != nil {
		return nil, err
	}
	impl := i.(afterIsCalledAfterPanicTestInterceptorIOCInterface)
	return impl, nil
}

type ThisafterIsCalledAfterPanicTestInterceptor struct {
}

func (t *ThisafterIsCalledAfterPanicTestInterceptor) This() afterIsCalledAfterPanicTestInterceptorIOCInterface {
	thisPtr, _ := GetafterIsCalledAfterPanicTestInterceptorIOCInterfaceSingleton()
	return thisPtr
}

var _panicAfterCalledTestSubAppSDID string

func GetPanicAfterCalledTestSubAppSingleton() (*PanicAfterCalledTestSubApp, error) {
	if _panicAfterCalledTestSubAppSDID == "" {
		_panicAfterCalledTestSubAppSDID = util.GetSDIDByStructPtr(new(PanicAfterCalledTestSubApp))
	}
	i, err := singleton.GetImpl(_panicAfterCalledTestSubAppSDID, nil)
	if err != nil {
		return nil, err
	}
	impl := i.(*PanicAfterCalledTestSubApp)
	return impl, nil
}

func GetPanicAfterCalledTestSubAppIOCInterfaceSingleton() (PanicAfterCalledTestSubAppIOCInterface, error) {
	if _panicAfterCalledTestSubAppSDID == "" {
		_panicAfterCalledTestSubAppSDID = util.GetSDIDByStructPtr(new(PanicAfterCalledTestSubApp))
	}
	i, err := singleton.GetImplWithProxy(_panicAfterCalledTestSubAppSDID, nil)
	if err != nil {
		return nil, err
	}
	impl := i.(PanicAfterCalledTestSubAppIOCInterface)
	return impl, nil
}

type ThisPanicAfterCalledTestSubApp struct {
}

func (t *ThisPanicAfterCalledTestSubApp) This() PanicAfterCalledTestSubAppIOCInterface {
	thisPtr, _ := GetPanicAfterCalledTestSubAppIOCInterfaceSingleton()
	return thisPtr
}

var _panicAfterCalledTestAppSDID string

func GetPanicAfterCalledTestAppSingleton() (*PanicAfterCalledTestApp, error) {
	if _panicAfterCalledTestAppSDID == "" {
		_panicAfterCalledTestAppSDID = util.GetSDIDByStructPtr(new(PanicAfterCalledTestApp))
	}
	i, err := singleton.GetImpl(_panicAfterCalledTestAppSDID, nil)
	if err != nil {
		return nil, err
	}
	impl := i.(*PanicAfterCalledTestApp)
	return impl, nil
}

func GetPanicAfterCalledTestAppIOCInterfaceSingleton() (PanicAfterCalledTestAppIOCInterface, error) {
	if _panicAfterCalledTestAppSDID == "" {
		_panicAfterCalledTestAppSDID = util.GetSDIDByStructPtr(new(PanicAfterCalledTestApp))
	}
	i, err := singleton.GetImplWithProxy(_panicAfterCalledTestAppSDID, nil)
	if err != nil {
		return nil, err
	}
	impl := i.(PanicAfterCalledTestAppIOCInterface)
	return impl, nil
}

type ThisPanicAfterCalledTestApp struct {
}

func (t *ThisPanicAfterCalledTestApp) This() PanicAfterCalledTestAppIOCInterface {
	thisPtr, _ := GetPanicAfterCalledTestAppIOCInterfaceSingleton()
	return thisPtr
}
