di

package
v0.0.0-...-d2fd310 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AutowiredMarker     = markers.Must(markers.MakeDefinition("ioc:autowired", markers.DescribesType, true))             // autowired: default: true
	ScopeMarker         = markers.Must(markers.MakeDefinition("ioc:autowired:scope", markers.DescribesType, ""))         // scope: singleton, prototype
	InterfacesMarker    = markers.Must(markers.MakeDefinition("ioc:autowired:interfaces", markers.DescribesType, ""))    // interfaces
	ParameterMarker     = markers.Must(markers.MakeDefinition("ioc:autowired:parameter", markers.DescribesType, ""))     // parameter
	ConstructorMarker   = markers.Must(markers.MakeDefinition("ioc:autowired:constructor", markers.DescribesType, ""))   // constructor
	ConfigurationMarker = markers.Must(markers.MakeDefinition("ioc:autowired:configuration", markers.DescribesType, "")) // configuration -> @Configuration
	BeanMarker          = markers.Must(markers.MakeDefinition("ioc:autowired:bean", markers.DescribesType, ""))          // bean -> @Bean
)

Functions

func IsInterface

func IsInterface(node ast.Node) bool

func IsNotInterface

func IsNotInterface(node ast.Node) bool

func WriteTo

func WriteTo(ctx *genall.GenerationContext, root *loader.Package, outBytes []byte, path string)

WriteTo - write to file

Copyright 2018 The Kubernetes Authors.

Types

type BeanDefinitionMaker

type BeanDefinitionMaker struct {
	*Imports
	*Writer
	TypeInfos []*markers.TypeInfo
	// contains filtered or unexported fields
}

func NewBeanDefinitionMaker

func NewBeanDefinitionMaker(pkg *loader.Package, imports *Imports, writer *Writer, typeInfos []*markers.TypeInfo) BeanDefinitionMaker

func (*BeanDefinitionMaker) Generate

func (c *BeanDefinitionMaker) Generate()

type Generator

type Generator struct {
	HeaderFile string `marker:",optional"`
	Year       string `marker:",optional"`
}

func (Generator) CheckFilter

func (Generator) CheckFilter() loader.NodeFilter

CheckFilter genall.NeedsTypeChecking

func (Generator) Generate

func (d Generator) Generate(ctx *genall.GenerationContext) error

func (Generator) RegisterMarkers

func (Generator) RegisterMarkers(into *markers.Registry) error

type IGenerator

type IGenerator interface {
	RegisterMarkers(into *markers.Registry) error
	Generate(*genall.GenerationContext) error
}

type Imports

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

type IocGoGenerationContext

type IocGoGenerationContext struct {
	Collector  *markers.Collector
	Checker    *loader.TypeChecker
	HeaderText string
}

func NewIocGoGenerationContext

func NewIocGoGenerationContext(ctx *genall.GenerationContext, headerText string) IocGoGenerationContext

type Writer

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

func NewWriter

func NewWriter(out io.Writer) *Writer

Jump to

Keyboard shortcuts

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