Version: v1.4.0 Latest Latest

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 10 Imported by: 0



Copyright 2018 John Deng (

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. package annotation provides annotation support for HiBoot



This section is empty.


This section is empty.


func Contains

func Contains(object interface{}, at interface{}) (ok bool)

Contains Has is a function that check if object is the implements of specific Annotation

func ContainsChild added in v1.3.0

func ContainsChild(input *Annotations, att interface{}) (ok bool)

ContainsChild is a function that find specific annotations.

func Inject added in v1.3.0

func Inject(ann *Annotation) (err error)

Inject inject annotations into object

func InjectAll added in v1.3.0

func InjectAll(object interface{}) (err error)

InjectAll inject annotations into object

func InjectItems added in v1.3.0

func InjectItems(annotations *Annotations) (err error)

InjectItems inject annotations into object

func IsAnnotation added in v1.3.0

func IsAnnotation(object interface{}) (yes bool)


type Annotation added in v1.3.0

type Annotation struct {
	Field  *Field
	Parent *types.ReflectObject

func FilterIn added in v1.3.0

func FilterIn(input *Annotations, att interface{}) (annotations []*Annotation)

Filter is a function that filter specific annotations.

func Find added in v1.3.0

func Find(input *Annotations, att interface{}) (annotation *Annotation)

Find is a function that find specific (child) annotation

func FindAll added in v1.3.0

func FindAll(object interface{}, att interface{}) (annotations []*Annotation)

Find is a function that find specific annotation.

func GetAnnotation added in v1.3.0

func GetAnnotation(object interface{}, att interface{}) (annotation *Annotation)

GetAnnotation is a function that get specific annotation of an object.

type Annotations added in v1.3.0

type Annotations struct {
	Items    []*Annotation
	Children []*Annotations

func GetAnnotations added in v1.3.0

func GetAnnotations(object interface{}) (annotations *Annotations)

GetAnnotations iterate annotations of a struct

type Field added in v1.3.0

type Field struct {
	StructField reflect.StructField
	Value       reflect.Value

annotation field

Source Files

Jump to

Keyboard shortcuts

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