github.com/tursom/GoCollections@v0.3.10/lang/Class.go (about)

     1  /*
     2   * Copyright (c) 2022 tursom. All rights reserved.
     3   * Use of this source code is governed by a GPL-3
     4   * license that can be found in the LICENSE file.
     5   */
     6  
     7  package lang
     8  
     9  import "reflect"
    10  
    11  type (
    12  	Class struct {
    13  		t       reflect.Type
    14  		methods map[string]Method
    15  		fields  map[string]Field
    16  	}
    17  	Method struct {
    18  	}
    19  	Field struct {
    20  	}
    21  )
    22  
    23  func (c Class) GetType() reflect.Type {
    24  	return c.t
    25  }
    26  
    27  func (c Class) GetName() String {
    28  	return NewString(c.t.Name())
    29  }
    30  
    31  func GenerateClass(t reflect.Type) *Class {
    32  	//TODO impl
    33  	//t.Method(1).Func.Call()
    34  	return nil
    35  }