Documentation
¶
Index ¶
- func EnableVerboseLogging()
- func FilterEntities(node []*Node, query parser.Query) bool
- func Fmt(format string, args ...interface{})
- func FormatType(v interface{}) string
- func GenerateMethodID(methodName string, parameters []string, sourceFile string) string
- func GenerateSha256(input string) string
- func IsGitHubActions() bool
- func Log(message string, args ...interface{})
- func QueryEntities(graph *CodeGraph, query parser.Query) (nodes [][]*Node, output [][]interface{})
- func ReplacePredicateVariables(query parser.Query) string
- type CodeGraph
- type Edge
- type Env
- func (env *Env) GetAnnotations() []string
- func (env *Env) GetArgumentNames() []string
- func (env *Env) GetArgumentTypes() []string
- func (env *Env) GetAssertStmt() *model.AssertStmt
- func (env *Env) GetBinaryExpr() *model.BinaryExpr
- func (env *Env) GetBlockStmt() *model.BlockStmt
- func (env *Env) GetBreakStmt() *model.BreakStmt
- func (env *Env) GetClassInstanceExpr() *model.ClassInstanceExpr
- func (env *Env) GetClassInstanceExprName() string
- func (env *Env) GetContinueStmt() *model.ContinueStmt
- func (env *Env) GetDoStmt() *model.DoStmt
- func (env *Env) GetDoc() *model.Javadoc
- func (env *Env) GetForStmt() *model.ForStmt
- func (env *Env) GetIfStmt() *model.IfStmt
- func (env *Env) GetInterfaces() []string
- func (env *Env) GetLeftOperand() string
- func (env *Env) GetName() string
- func (env *Env) GetReturnStmt() *model.ReturnStmt
- func (env *Env) GetReturnType() string
- func (env *Env) GetRightOperand() string
- func (env *Env) GetScope() string
- func (env *Env) GetSuperClass() string
- func (env *Env) GetThrowsTypes() []string
- func (env *Env) GetVariableDataType() string
- func (env *Env) GetVariableValue() string
- func (env *Env) GetVisibility() string
- func (env *Env) GetWhileStmt() *model.WhileStmt
- func (env *Env) GetYieldStmt() *model.YieldStmt
- func (env *Env) HasAccess() bool
- func (env *Env) IsJavaSourceFile() bool
- func (env *Env) ToString() string
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableVerboseLogging ¶
func EnableVerboseLogging()
EnableVerboseLogging enables verbose logging mode.
func Fmt ¶
func Fmt(format string, args ...interface{})
Fmt prints formatted output if verbose logging is enabled.
func FormatType ¶
func FormatType(v interface{}) string
FormatType formats various types to string representation.
func GenerateMethodID ¶
GenerateMethodID generates a unique SHA256 hash ID for a method.
func GenerateSha256 ¶
GenerateSha256 generates a SHA256 hash from an input string.
func IsGitHubActions ¶
func IsGitHubActions() bool
IsGitHubActions checks if running in GitHub Actions environment.
func Log ¶
func Log(message string, args ...interface{})
Log logs a message if verbose logging is enabled.
func QueryEntities ¶
Types ¶
type CodeGraph ¶
CodeGraph represents the entire code graph with nodes and edges.
func Initialize ¶
Initialize initializes the code graph by parsing all source files in a directory.
func NewCodeGraph ¶
func NewCodeGraph() *CodeGraph
NewCodeGraph creates and initializes a new CodeGraph instance.
func (*CodeGraph) FindNodesByType ¶
FindNodesByType finds all nodes of a given type.
type Env ¶
type Env struct {
Node *Node
}
func (*Env) GetAnnotations ¶
func (*Env) GetArgumentNames ¶
func (*Env) GetArgumentTypes ¶
func (*Env) GetAssertStmt ¶
func (env *Env) GetAssertStmt() *model.AssertStmt
func (*Env) GetBinaryExpr ¶
func (env *Env) GetBinaryExpr() *model.BinaryExpr
func (*Env) GetBlockStmt ¶
func (*Env) GetBreakStmt ¶
func (*Env) GetClassInstanceExpr ¶
func (env *Env) GetClassInstanceExpr() *model.ClassInstanceExpr
func (*Env) GetClassInstanceExprName ¶
func (*Env) GetContinueStmt ¶
func (env *Env) GetContinueStmt() *model.ContinueStmt
func (*Env) GetForStmt ¶
func (*Env) GetInterfaces ¶
func (*Env) GetLeftOperand ¶
func (*Env) GetReturnStmt ¶
func (env *Env) GetReturnStmt() *model.ReturnStmt
func (*Env) GetReturnType ¶
func (*Env) GetRightOperand ¶
func (*Env) GetSuperClass ¶
func (*Env) GetThrowsTypes ¶
func (*Env) GetVariableDataType ¶
func (*Env) GetVariableValue ¶
func (*Env) GetVisibility ¶
func (*Env) GetWhileStmt ¶
func (*Env) GetYieldStmt ¶
func (*Env) IsJavaSourceFile ¶
type Node ¶
type Node struct {
ID string
Type string
Name string
CodeSnippet string
LineNumber uint32
OutgoingEdges []*Edge
IsExternal bool
Modifier string
ReturnType string
MethodArgumentsType []string
MethodArgumentsValue []string
PackageName string
ImportPackage []string
SuperClass string
Interface []string
DataType string
Scope string
VariableValue string
File string
ThrowsExceptions []string
Annotation []string
JavaDoc *model.Javadoc
BinaryExpr *model.BinaryExpr
ClassInstanceExpr *model.ClassInstanceExpr
IfStmt *model.IfStmt
WhileStmt *model.WhileStmt
DoStmt *model.DoStmt
ForStmt *model.ForStmt
BreakStmt *model.BreakStmt
ContinueStmt *model.ContinueStmt
YieldStmt *model.YieldStmt
AssertStmt *model.AssertStmt
ReturnStmt *model.ReturnStmt
BlockStmt *model.BlockStmt
// contains filtered or unexported fields
}
Node represents a node in the code graph with various properties describing code elements like classes, methods, variables, etc.