Documentation
¶
Index ¶
- func BuildCallMethodMap(deps []CodeDataStruct) map[string]CodeFunction
- func BuildDIMap(identifiers []CodeDataStruct, identifierMap map[string]CodeDataStruct) map[string]string
- func BuildIdentifierMap(identifiers []CodeDataStruct) map[string]CodeDataStruct
- type AnnotationKeyValue
- type CodeAnnotation
- type CodeCall
- type CodeContainer
- type CodeDataStruct
- func (d *CodeDataStruct) BuildStringMethodMap(projectMethods map[string]string)
- func (d *CodeDataStruct) GetClassFullName() string
- func (d *CodeDataStruct) IsNotEmpty() bool
- func (d *CodeDataStruct) IsServiceClass() bool
- func (d *CodeDataStruct) IsUtilClass() bool
- func (d *CodeDataStruct) SetMethodFromMap(methodMap map[string]CodeFunction)
- type CodeDependency
- type CodeField
- type CodeFunction
- func (m *CodeFunction) BuildFullMethodName(node CodeDataStruct) string
- func (m *CodeFunction) BuildSingleReturnType(typeType string) *CodeProperty
- func (m *CodeFunction) GetAllCallString() []string
- func (m *CodeFunction) IsGetterSetter() bool
- func (m *CodeFunction) IsJavaLangReturnType() bool
- func (m *CodeFunction) IsJunitTest() bool
- func (m *CodeFunction) IsStatic() bool
- type CodeImport
- type CodeMember
- type CodeModule
- type CodePackage
- type CodePackageInfo
- type CodePosition
- type CodeProject
- type CodeProperty
- type GoCodePackage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCallMethodMap ¶
func BuildCallMethodMap(deps []CodeDataStruct) map[string]CodeFunction
func BuildDIMap ¶
func BuildDIMap(identifiers []CodeDataStruct, identifierMap map[string]CodeDataStruct) map[string]string
func BuildIdentifierMap ¶
func BuildIdentifierMap(identifiers []CodeDataStruct) map[string]CodeDataStruct
Types ¶
type AnnotationKeyValue ¶
func NewAnnotationKeyValue ¶
func NewAnnotationKeyValue(key string, value string) AnnotationKeyValue
type CodeAnnotation ¶
type CodeAnnotation struct {
Name string
KeyValues []AnnotationKeyValue
}
func NewAnnotation ¶
func NewAnnotation() CodeAnnotation
func (*CodeAnnotation) IsComponentOrRepository ¶
func (n *CodeAnnotation) IsComponentOrRepository() bool
func (*CodeAnnotation) IsIgnoreOrTest ¶
func (n *CodeAnnotation) IsIgnoreOrTest() bool
func (*CodeAnnotation) IsIgnoreTest ¶
func (n *CodeAnnotation) IsIgnoreTest() bool
func (*CodeAnnotation) IsTest ¶
func (n *CodeAnnotation) IsTest() bool
type CodeCall ¶
type CodeCall struct {
Package string
Type string
NodeName string
FunctionName string
Parameters []CodeProperty
Position CodePosition
}
func NewCodeMethodCall ¶
func NewCodeMethodCall() CodeCall
func (*CodeCall) BuildClassFullName ¶
func (*CodeCall) BuildFullMethodName ¶
func (*CodeCall) HasAssertion ¶
func (*CodeCall) IsSystemOutput ¶
func (*CodeCall) IsThreadSleep ¶
type CodeContainer ¶
type CodeContainer struct {
FullName string
PackageName string
Imports []CodeImport
Members []CodeMember
DataStructures []CodeDataStruct
Fields []CodeField
Containers []CodeContainer
}
type CodeDataStruct ¶
type CodeDataStruct struct {
NodeName string
Type string
Package string
FilePath string
Fields []CodeField
Extend string
MultipleExtend []string // for C++
Implements []string
Functions []CodeFunction
InnerStructures []CodeDataStruct
Annotations []CodeAnnotation
FunctionCalls []CodeCall // for field call
InOutProperties []CodeProperty //for golang interface
//Parameters []CodeProperty
Extension interface{}
Imports []CodeImport // deprecated: should get from code file
}
func NewDataStruct ¶
func NewDataStruct() *CodeDataStruct
func (*CodeDataStruct) BuildStringMethodMap ¶
func (d *CodeDataStruct) BuildStringMethodMap(projectMethods map[string]string)
func (*CodeDataStruct) GetClassFullName ¶
func (d *CodeDataStruct) GetClassFullName() string
func (*CodeDataStruct) IsNotEmpty ¶
func (d *CodeDataStruct) IsNotEmpty() bool
func (*CodeDataStruct) IsServiceClass ¶
func (d *CodeDataStruct) IsServiceClass() bool
func (*CodeDataStruct) IsUtilClass ¶
func (d *CodeDataStruct) IsUtilClass() bool
func (*CodeDataStruct) SetMethodFromMap ¶
func (d *CodeDataStruct) SetMethodFromMap(methodMap map[string]CodeFunction)
type CodeDependency ¶
type CodeDependency struct {
GroupId string
ArtifactId string
Scope string
Type string
Version string
Optional bool
}
func NewCodeDependency ¶
func NewCodeDependency(group string, artifact string) *CodeDependency
type CodeFunction ¶
type CodeFunction struct {
Name string
ReturnType string
MultipleReturns []CodeProperty
Parameters []CodeProperty
FunctionCalls []CodeCall
Override bool
Annotations []CodeAnnotation
IsConstructor bool // todo: move to extension
IsReturnNull bool // todo: move to extension
Modifiers []string
InnerStructures []CodeDataStruct
InnerFunctions []CodeFunction
Extension interface{}
Position CodePosition
}
func NewJMethod ¶
func NewJMethod() CodeFunction
func (*CodeFunction) BuildFullMethodName ¶
func (m *CodeFunction) BuildFullMethodName(node CodeDataStruct) string
func (*CodeFunction) BuildSingleReturnType ¶
func (m *CodeFunction) BuildSingleReturnType(typeType string) *CodeProperty
func (*CodeFunction) GetAllCallString ¶
func (m *CodeFunction) GetAllCallString() []string
func (*CodeFunction) IsGetterSetter ¶
func (m *CodeFunction) IsGetterSetter() bool
func (*CodeFunction) IsJavaLangReturnType ¶
func (m *CodeFunction) IsJavaLangReturnType() bool
func (*CodeFunction) IsJunitTest ¶
func (m *CodeFunction) IsJunitTest() bool
func (*CodeFunction) IsStatic ¶
func (m *CodeFunction) IsStatic() bool
type CodeImport ¶
type CodeImport struct {
Source string
AsName string
ImportName string
UsageName []string
Scope string // function, method or class
}
func NewJImport ¶
func NewJImport(str string) CodeImport
type CodeMember ¶
type CodeMember struct {
ID string
AliasPackage string
Name string
Type string
Structures []CodeDataStruct
FunctionNodes []CodeFunction
Namespace []string
FileID string
DataStructID string
Position CodePosition
}
func NewCodeMember ¶
func NewCodeMember() *CodeMember
func (*CodeMember) BuildMemberId ¶
func (c *CodeMember) BuildMemberId()
type CodeModule ¶
type CodeModule struct {
Packages []CodePackage
PackageInfo CodePackageInfo
}
type CodePackage ¶
type CodePackage struct {
Name string
ID string
CodeFiles []CodeContainer
Extension interface{}
}
type CodePackageInfo ¶
type CodePackageInfo struct {
ProjectName string
Dependencies []CodeDependency
}
type CodePosition ¶
type CodeProject ¶
type CodeProject struct {
Modules []CodeModule
}
type CodeProperty ¶
type CodeProperty struct {
Modifiers []string
ParamName string
TypeValue string
TypeType string
ReturnTypes []CodeProperty
Parameters []CodeProperty
}
func NewCodeParameter ¶
func NewCodeParameter(typeType string, typeValue string) CodeProperty
type GoCodePackage ¶
type GoCodePackage struct {
Fields []CodeField
}
Click to show internal directories.
Click to hide internal directories.