// NumChildren returns the number of fields or slice elements.
NumChildren returns the number of fields or slice elements.
// NumChildren returns the number of fields or slice elements .
func (a *Abstract) NumChildren() int {
	if a.value == nil {
		return 0
	}
	switch a.typeData.Kind {
	case KindStruct:
		return len(a.typeData.Fields)
	case KindSlice:
		return (*reflect.SliceHeader)(a.value).Len
	default:
		panic(fmt.Errorf("unimplemented: %d", a.typeData.Kind))
	}
}
func ( a * Abstract ) NumChildren ( ) int { if a . value == nil { return 0 } switch a . typeData . Kind { case KindStruct : return len ( a . typeData . Fields ) case KindSlice : return ( * reflect . SliceHeader ) ( a . value ) . Len default : panic ( fmt . Errorf ( " " , a . typeData . Kind ) ) } }
NumChildren returns the number of fields or slice elements.
NumChildren returns the number of fields or slice elements .
// Interfaces should be replaced by a more specific type and // pointers should be dereferenced.