2018-08-23 08:06:25 +00:00
|
|
|
package annotation
|
|
|
|
|
|
|
|
// @Inject(name? string)
|
|
|
|
|
|
|
|
import (
|
|
|
|
"reflect"
|
|
|
|
|
|
|
|
oa "git.loafle.net/overflow/annotation-go"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
oa.Register(InjectAnnotationType)
|
|
|
|
}
|
|
|
|
|
|
|
|
var InjectAnnotationType = reflect.TypeOf((*InjectAnnotation)(nil))
|
|
|
|
|
|
|
|
type InjectAnnotation struct {
|
|
|
|
oa.Annotation `@name:"@Inject"`
|
|
|
|
Name string `json:"name" @default:""`
|
2018-09-04 06:12:06 +00:00
|
|
|
Required bool `json:"required" @default:"true"`
|
2018-08-23 08:06:25 +00:00
|
|
|
}
|