Documentation
¶
Index ¶
- type BaseStructure
- type ClassStructure
- type FieldStructure
- type FileStructure
- func (s *FileStructure) AddClass(pkg string, name string) *ClassStructure
- func (s *FileStructure) AddFunction(name string, params []string, result string) *FunctionStructure
- func (s *FileStructure) AddInternalClass(c *ClassStructure)
- func (s *FileStructure) AddInternalFunctions(f *FunctionStructure)
- func (s *FileStructure) FullName() string
- func (s *FileStructure) GetParent() StructureElement
- func (s *FileStructure) GetRoot() *FileStructure
- func (s *FileStructure) ResolveClasses()
- type FunctionStructure
- type StructureElement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseStructure ¶
type BaseStructure struct {
// contains filtered or unexported fields
}
func (*BaseStructure) GetParent ¶
func (s *BaseStructure) GetParent() StructureElement
func (*BaseStructure) GetRoot ¶
func (s *BaseStructure) GetRoot() *FileStructure
type ClassStructure ¶
type ClassStructure struct {
BaseStructure
Package string
Name string
Methods map[string]*FunctionStructure
Properties map[string]*FieldStructure
}
func NewClassStructure ¶
func NewClassStructure(root *FileStructure, parent StructureElement, pkg, name string) *ClassStructure
func (*ClassStructure) AddClass ¶
func (s *ClassStructure) AddClass(pkg string, name string) *ClassStructure
func (*ClassStructure) AddFunction ¶
func (s *ClassStructure) AddFunction(name string, params []string, result string) *FunctionStructure
func (*ClassStructure) FullName ¶
func (s *ClassStructure) FullName() string
type FieldStructure ¶
type FieldStructure struct {
BaseStructure
Name string
Type string
}
type FileStructure ¶
type FileStructure struct {
Path string
Classes map[string]*ClassStructure
Functions map[string]*FunctionStructure
AllClasses map[string]*ClassStructure
AllFunctions map[string]*FunctionStructure
AllStructures map[any]StructureElement
}
func NewFileStructure ¶
func NewFileStructure(path string) *FileStructure
func (*FileStructure) AddClass ¶
func (s *FileStructure) AddClass(pkg string, name string) *ClassStructure
func (*FileStructure) AddFunction ¶
func (s *FileStructure) AddFunction(name string, params []string, result string) *FunctionStructure
func (*FileStructure) AddInternalClass ¶
func (s *FileStructure) AddInternalClass(c *ClassStructure)
func (*FileStructure) AddInternalFunctions ¶
func (s *FileStructure) AddInternalFunctions(f *FunctionStructure)
func (*FileStructure) FullName ¶
func (s *FileStructure) FullName() string
func (*FileStructure) GetParent ¶
func (s *FileStructure) GetParent() StructureElement
func (*FileStructure) GetRoot ¶
func (s *FileStructure) GetRoot() *FileStructure
func (*FileStructure) ResolveClasses ¶
func (s *FileStructure) ResolveClasses()
type FunctionStructure ¶
type FunctionStructure struct {
BaseStructure
Name string
Params []string
Result string
}
func NewFunctionStructure ¶
func NewFunctionStructure(root *FileStructure, parent StructureElement, name string, params []string, result string) *FunctionStructure
func (*FunctionStructure) AddClass ¶
func (s *FunctionStructure) AddClass(pkg string, name string) *ClassStructure
func (*FunctionStructure) AddFunction ¶
func (s *FunctionStructure) AddFunction(name string, params []string, result string) *FunctionStructure
func (*FunctionStructure) FullName ¶
func (s *FunctionStructure) FullName() string
type StructureElement ¶
type StructureElement interface {
FullName() string
GetRoot() *FileStructure
GetParent() StructureElement
AddClass(pkg string, name string) *ClassStructure
AddFunction(name string, params []string, result string) *FunctionStructure
}
Click to show internal directories.
Click to hide internal directories.