core_domain

package
v1.9.11 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

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

type AnnotationKeyValue struct {
	Key   string
	Value string
}

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 (c *CodeCall) BuildClassFullName() string

func (*CodeCall) BuildFullMethodName

func (c *CodeCall) BuildFullMethodName() string

func (*CodeCall) HasAssertion

func (c *CodeCall) HasAssertion() bool

func (*CodeCall) IsSystemOutput

func (c *CodeCall) IsSystemOutput() bool

func (*CodeCall) IsThreadSleep

func (c *CodeCall) IsThreadSleep() bool

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 CodeField

type CodeField struct {
	TypeType  string
	TypeValue string
	Modifiers []string
}

func NewJField

func NewJField(typeType string, typeValue string, modifier string) CodeField

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 CodePosition struct {
	StartLine         int
	StartLinePosition int
	StopLine          int
	StopLinePosition  int
}

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
}

Jump to

Keyboard shortcuts

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