model

package
v0.0.0-...-001ab24 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddExpr

type AddExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*AddExpr) GetOp

func (e *AddExpr) GetOp() string

type AndBitwiseExpr

type AndBitwiseExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*AndBitwiseExpr) GetOp

func (e *AndBitwiseExpr) GetOp() string

type AndLogicalExpr

type AndLogicalExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*AndLogicalExpr) GetOp

func (e *AndLogicalExpr) GetOp() string

type AssertStmt

type AssertStmt struct {
	Stmt
	Expr    *Expr
	Message *Expr
}

func (*AssertStmt) GetAPrimaryQlClass

func (assertStmt *AssertStmt) GetAPrimaryQlClass() string

func (*AssertStmt) GetExpr

func (assertStmt *AssertStmt) GetExpr() *Expr

func (*AssertStmt) GetHalsteadID

func (assertStmt *AssertStmt) GetHalsteadID() int

func (*AssertStmt) GetMessage

func (assertStmt *AssertStmt) GetMessage() *Expr

func (*AssertStmt) GetPP

func (assertStmt *AssertStmt) GetPP() string

func (*AssertStmt) ToString

func (assertStmt *AssertStmt) ToString() string

type BaseTop

type BaseTop interface {
	GetAPrimaryQlClass() string
	GetFile() string
	GetLocation() Location
	GetNumberOfCommentLines() int
	GetNumberOfLinesOfCode() int
	GetPrimaryQlClasses() string
	GetTotalNumberOfLines() int
	HasLocationInfo(filepath string, startline, startcolumn, endline, endcolumn int) bool
	ToString() string
}

type BasicBlock

type BasicBlock struct {
	ControlFlowNode
}

type BinaryExpr

type BinaryExpr struct {
	Expr
	Op           string
	LeftOperand  *Expr
	RightOperand *Expr
}

func (*BinaryExpr) GetAnOperand

func (e *BinaryExpr) GetAnOperand() *Expr

func (*BinaryExpr) GetKind

func (e *BinaryExpr) GetKind() int

func (*BinaryExpr) GetLeftOperand

func (e *BinaryExpr) GetLeftOperand() *Expr

func (*BinaryExpr) GetLeftOperandString

func (e *BinaryExpr) GetLeftOperandString() string

func (*BinaryExpr) GetOp

func (e *BinaryExpr) GetOp() string

func (*BinaryExpr) GetRightOperand

func (e *BinaryExpr) GetRightOperand() *Expr

func (*BinaryExpr) GetRightOperandString

func (e *BinaryExpr) GetRightOperandString() string

func (*BinaryExpr) HasOperands

func (e *BinaryExpr) HasOperands(expr1, expr2 *Expr) bool

func (*BinaryExpr) ToString

func (e *BinaryExpr) ToString() string

type BlockStmt

type BlockStmt struct {
	Stmt
	Stmts []Stmt
}

func (*BlockStmt) GetAPrimaryQlClass

func (blockStmt *BlockStmt) GetAPrimaryQlClass() string

func (*BlockStmt) GetAStmt

func (blockStmt *BlockStmt) GetAStmt() Stmt

func (*BlockStmt) GetHalsteadID

func (blockStmt *BlockStmt) GetHalsteadID() int

func (*BlockStmt) GetLastStmt

func (blockStmt *BlockStmt) GetLastStmt() Stmt

func (*BlockStmt) GetNumStmt

func (blockStmt *BlockStmt) GetNumStmt() int

func (*BlockStmt) GetPP

func (blockStmt *BlockStmt) GetPP() string

func (*BlockStmt) GetStmt

func (blockStmt *BlockStmt) GetStmt(index int) Stmt

func (*BlockStmt) ToString

func (blockStmt *BlockStmt) ToString() string

type BreakStmt

type BreakStmt struct {
	JumpStmt
	Label string
}

func (*BreakStmt) GetAPrimaryQlClass

func (breakStmt *BreakStmt) GetAPrimaryQlClass() string

func (*BreakStmt) GetHalsteadID

func (breakStmt *BreakStmt) GetHalsteadID() int

func (*BreakStmt) GetLabel

func (breakStmt *BreakStmt) GetLabel() string

func (*BreakStmt) GetPP

func (breakStmt *BreakStmt) GetPP() string

func (*BreakStmt) ToString

func (breakStmt *BreakStmt) ToString() string

type Callable

type Callable struct {
	StmtParent
	CallableName string
}

type ClassInstanceExpr

type ClassInstanceExpr struct {
	Expr
	ClassName string
	Args      []*Expr
}

func (*ClassInstanceExpr) GetArg

func (e *ClassInstanceExpr) GetArg(i int) *Expr

func (*ClassInstanceExpr) GetArgs

func (e *ClassInstanceExpr) GetArgs() []*Expr

func (*ClassInstanceExpr) GetClassName

func (e *ClassInstanceExpr) GetClassName() string

func (*ClassInstanceExpr) GetNumArgs

func (e *ClassInstanceExpr) GetNumArgs() int

func (*ClassInstanceExpr) String

func (e *ClassInstanceExpr) String() string

type ComparisonExpr

type ComparisonExpr struct {
	BinaryExpr
}

func (*ComparisonExpr) GetGreaterThanOperand

func (e *ComparisonExpr) GetGreaterThanOperand() *Expr

func (*ComparisonExpr) GetLessThanOperand

func (e *ComparisonExpr) GetLessThanOperand() *Expr

func (*ComparisonExpr) IsStrict

func (e *ComparisonExpr) IsStrict() bool

type CompilationUnit

type CompilationUnit struct {
	File

	CuPackage Package
	Name      string
	// contains filtered or unexported fields
}

func (*CompilationUnit) GetAPrimaryQlClass

func (c *CompilationUnit) GetAPrimaryQlClass() string

func (*CompilationUnit) GetModule

func (c *CompilationUnit) GetModule() Module

func (*CompilationUnit) GetName

func (c *CompilationUnit) GetName() string

func (*CompilationUnit) GetPackage

func (c *CompilationUnit) GetPackage() Package

func (*CompilationUnit) HasName

func (c *CompilationUnit) HasName(name string) bool

func (*CompilationUnit) ToString

func (c *CompilationUnit) ToString() string

type ConditionalStmt

type ConditionalStmt struct {
	Stmt
	Condition *Expr
}

type Container

type Container struct {
	Top
}

func (*Container) ToString

func (c *Container) ToString() string

type ContinueStmt

type ContinueStmt struct {
	JumpStmt
	Label string
}

func (*ContinueStmt) GetAPrimaryQlClass

func (continueStmt *ContinueStmt) GetAPrimaryQlClass() string

func (*ContinueStmt) GetHalsteadID

func (continueStmt *ContinueStmt) GetHalsteadID() int

func (*ContinueStmt) GetLabel

func (continueStmt *ContinueStmt) GetLabel() string

func (*ContinueStmt) GetPP

func (continueStmt *ContinueStmt) GetPP() string

func (*ContinueStmt) ToString

func (continueStmt *ContinueStmt) ToString() string

type ControlFlowNode

type ControlFlowNode struct {
	Top
}

type Directive

type Directive struct {
	Directive string
}

func (*Directive) ToString

func (d *Directive) ToString() string

type DivExpr

type DivExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*DivExpr) GetOp

func (e *DivExpr) GetOp() string

type DoStmt

type DoStmt struct {
	ConditionalStmt
}

type EqExpr

type EqExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*EqExpr) GetOp

func (e *EqExpr) GetOp() string

type Expr

type Expr struct {
	ExprParent
	Kind       int
	Node       sitter.Node
	NodeString string
	Type       string
}

func (*Expr) GetAChildExpr

func (e *Expr) GetAChildExpr() *Expr

func (*Expr) GetBoolValue

func (e *Expr) GetBoolValue()

func (*Expr) GetChildExpr

func (e *Expr) GetChildExpr(_ int) *Expr

func (*Expr) GetKind

func (e *Expr) GetKind() int

func (*Expr) GetNumChildExpr

func (e *Expr) GetNumChildExpr() int64

func (*Expr) String

func (e *Expr) String() string

type ExprParent

type ExprParent struct{}

func (*ExprParent) GetAChildExpr

func (e *ExprParent) GetAChildExpr() *Expr

func (*ExprParent) GetChildExpr

func (e *ExprParent) GetChildExpr(_ int) *Expr

func (*ExprParent) GetNumChildExpr

func (e *ExprParent) GetNumChildExpr() int64

type File

type File struct {
	Container
	File string
}

func (*File) GetAPrimaryQlClass

func (f *File) GetAPrimaryQlClass() string

func (*File) IsJavaSourceFile

func (f *File) IsJavaSourceFile() bool

func (*File) IsKotlinSourceFile

func (f *File) IsKotlinSourceFile() bool

func (*File) IsSourceFile

func (f *File) IsSourceFile() bool

type ForStmt

type ForStmt struct {
	ConditionalStmt
	Init      *Expr
	Increment *Expr
}

func (*ForStmt) GetAnInit

func (forStmt *ForStmt) GetAnInit() *Expr

func (*ForStmt) GetAnUpdate

func (forStmt *ForStmt) GetAnUpdate() *Expr

func (*ForStmt) GetCondition

func (forStmt *ForStmt) GetCondition() *Expr

func (*ForStmt) GetPrimaryQlClass

func (forStmt *ForStmt) GetPrimaryQlClass() string

func (*ForStmt) ToString

func (forStmt *ForStmt) ToString() string

type GEExpr

type GEExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*GEExpr) GetOp

func (e *GEExpr) GetOp() string

type GTExpr

type GTExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*GTExpr) GetOp

func (e *GTExpr) GetOp() string

type IAssertStmt

type IAssertStmt interface {
	GetAPrimaryQlClass() string
	GetHalsteadID() int
	GetPP() string
	ToString() string
	GetMessage() *Expr
	GetExpr() *Expr
}

type IBlockStmt

type IBlockStmt interface {
	GetAPrimaryQlClass() string
	GetHalsteadID() int
	GetPP() string
	ToString() string
	GetStmt(index int) Stmt
	GetAStmt() Stmt
	GetNumStmt() int
	GetLastStmt() Stmt
}

type IBreakStmt

type IBreakStmt interface {
	GetAPrimaryQlClass() string
	GetHalsteadID() int
	GetLabel() string

	GetPP() string
	ToString() string
	// contains filtered or unexported methods
}

type IConditionalStmt

type IConditionalStmt interface {
	GetCondition() *Expr
}

type IContinueStmt

type IContinueStmt interface {
	GetAPrimaryQlClass() string
	GetHalsteadID() int
	GetLabel() string

	GetPP() string
	ToString() string
	// contains filtered or unexported methods
}

type IDoStmt

type IDoStmt interface {
	GetAPrimaryQlClass() string
	GetCondition() *Expr
	GetHalsteadID() int
	GetStmt() *Stmt
	GetPP() string
	ToString() string
}

type IForStmt

type IForStmt interface {
	GetPrimaryQlClass() string
	GetAnInit() *Expr
	GetAnIterationVariable() *Expr
	GetAnUpdate() *Expr
	GetCondition() *Expr
	GetHalsteadID() int
	GetInit(int) *Expr
	GetStmt() *Stmt
	GetUpdate(int) *Expr
	GetPP() string
	ToString() string
}

type IIfStmt

type IIfStmt interface {
	GetCondition() *Expr
	GetElse() *Stmt
	GetThen() *Stmt
	GetHalsteadID() int
	GetAPrimaryQlClass() string
	GetPP() string
	ToString() string
}

type IJumpStmt

type IJumpStmt interface {
	GetTarget() *StmtParent
	GetTargetLabel() *LabeledStmt
}

type ILabeledStmt

type ILabeledStmt interface {
	GetAPrimaryQlClass() string
	GetHalsteadID() int
	GetLabel() *LabeledStmt
	GetPP() string
	ToString() string
}

type IReturnStmt

type IReturnStmt interface {
	GetAPrimaryQlClass() string
	GetHalsteadID() int
	GetPP() string
	ToString() string
	GetResult() *Expr
}

type IStmt

type IStmt interface {
	GetAChildStmt() *Stmt
	GetBasicBlock() *BasicBlock
	GetCompilationUnit() *CompilationUnit
	GetControlFlowNode() *ControlFlowNode
	GetEnclosingCallable() *Callable
	GetEnclosingStmt() *Stmt
	GetHalsteadID() int
	GetIndex() int
	GetMetrics() interface{}
	GetParent() *Stmt
	IsNthChildOf(parent *Stmt, n int) bool
	Pp() string
	ToString() string
}

type IWhileStmt

type IWhileStmt interface {
	GetAPrimaryQlClass() string
	GetCondition() *Expr
	GetHalsteadID() int
	GetStmt() Stmt
	GetPP() string
	ToString() string
}

type IYieldStmt

type IYieldStmt interface {
	GetAPrimaryQlClass() string
	GetHalsteadID() int
	GetPP() string
	ToString() string
	GetValue() *Expr
}

type IfStmt

type IfStmt struct {
	ConditionalStmt
	Else Stmt
	Then Stmt
}

func (*IfStmt) GetAPrimaryQlClass

func (ifStmt *IfStmt) GetAPrimaryQlClass() string

func (*IfStmt) GetCondition

func (ifStmt *IfStmt) GetCondition() *Expr

func (*IfStmt) GetElse

func (ifStmt *IfStmt) GetElse() *Stmt

func (*IfStmt) GetPP

func (ifStmt *IfStmt) GetPP() string

func (*IfStmt) GetThen

func (ifStmt *IfStmt) GetThen() *Stmt

func (*IfStmt) ToString

func (ifStmt *IfStmt) ToString() string

type JarFile

type JarFile struct {
	File
	JarFile                 string
	ImplementationVersion   string
	ManifestEntryAttributes map[string]map[string]string
	ManifestMainAttributes  map[string]string
	SpecificationVersion    string
}

func (*JarFile) GetAPrimaryQlClass

func (j *JarFile) GetAPrimaryQlClass() string

func (*JarFile) GetImplementationVersion

func (j *JarFile) GetImplementationVersion() string

func (*JarFile) GetJarFile

func (j *JarFile) GetJarFile() string

func (*JarFile) GetManifestEntryAttributes

func (j *JarFile) GetManifestEntryAttributes(entry, key string) (string, bool)

func (*JarFile) GetManifestMainAttributes

func (j *JarFile) GetManifestMainAttributes(key string) (string, bool)

func (*JarFile) GetSpecificationVersion

func (j *JarFile) GetSpecificationVersion() string

type Javadoc

type Javadoc struct {
	Tags                  []*JavadocTag
	NumberOfCommentLines  int
	CommentedCodeElements string
	Version               string // redundant from tags
	Author                string // redundant from tags
}

func (*Javadoc) GetCommentAuthor

func (j *Javadoc) GetCommentAuthor() string

func (*Javadoc) GetCommentParam

func (j *Javadoc) GetCommentParam() []string

func (*Javadoc) GetCommentReturn

func (j *Javadoc) GetCommentReturn() string

func (*Javadoc) GetCommentSee

func (j *Javadoc) GetCommentSee() string

func (*Javadoc) GetCommentSince

func (j *Javadoc) GetCommentSince() string

func (*Javadoc) GetCommentThrows

func (j *Javadoc) GetCommentThrows() string

func (*Javadoc) GetCommentVersion

func (j *Javadoc) GetCommentVersion() string

type JavadocTag

type JavadocTag struct {
	TagName string
	Text    string
	DocType string
}

JavadocTag represents a generic Javadoc tag.

func NewJavadocTag

func NewJavadocTag(tagName, text, docType string) *JavadocTag

NewJavadocTag is a constructor for JavadocTag.

type JumpStmt

type JumpStmt struct {
	Stmt
}

type LEExpr

type LEExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*LEExpr) GetOp

func (e *LEExpr) GetOp() string

type LTExpr

type LTExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*LTExpr) GetOp

func (e *LTExpr) GetOp() string

type LabeledStmt

type LabeledStmt struct {
	Stmt
	Label *LabeledStmt
}

type LeftShiftExpr

type LeftShiftExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*LeftShiftExpr) GetOp

func (e *LeftShiftExpr) GetOp() string

type Location

type Location struct {
	File string
	Line int
}

type Module

type Module struct {
	Cu   *CompilationUnit
	Di   Directive
	Name string
	// contains filtered or unexported fields
}

func (*Module) GetACompilationUnit

func (m *Module) GetACompilationUnit() *CompilationUnit

func (*Module) GetAPrimaryQlClass

func (m *Module) GetAPrimaryQlClass() string

func (*Module) GetDirective

func (m *Module) GetDirective() *Directive

func (*Module) GetName

func (m *Module) GetName() string

func (*Module) IsOpen

func (m *Module) IsOpen() bool

func (*Module) ToString

func (m *Module) ToString() string

type MulExpr

type MulExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*MulExpr) GetOp

func (e *MulExpr) GetOp() string

type NEExpr

type NEExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*NEExpr) GetOp

func (e *NEExpr) GetOp() string

type OrBitwiseExpr

type OrBitwiseExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*OrBitwiseExpr) GetOp

func (e *OrBitwiseExpr) GetOp() string

type OrLogicalExpr

type OrLogicalExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*OrLogicalExpr) GetOp

func (e *OrLogicalExpr) GetOp() string

type Package

type Package struct {
	Package string
}

func (*Package) GetAPrimaryQlClass

func (p *Package) GetAPrimaryQlClass() string

func (*Package) GetURL

func (p *Package) GetURL() string

type RemExpr

type RemExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*RemExpr) GetOp

func (e *RemExpr) GetOp() string

type ReturnStmt

type ReturnStmt struct {
	Stmt
	Result *Expr
}

func (*ReturnStmt) GetAPrimaryQlClass

func (returnStmt *ReturnStmt) GetAPrimaryQlClass() string

func (*ReturnStmt) GetHalsteadID

func (returnStmt *ReturnStmt) GetHalsteadID() int

func (*ReturnStmt) GetPP

func (returnStmt *ReturnStmt) GetPP() string

func (*ReturnStmt) GetResult

func (returnStmt *ReturnStmt) GetResult() *Expr

func (*ReturnStmt) ToString

func (returnStmt *ReturnStmt) ToString() string

type RightShiftExpr

type RightShiftExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*RightShiftExpr) GetOp

func (e *RightShiftExpr) GetOp() string

type Stmt

type Stmt struct {
	NodeString string
	StmtParent
}

type StmtParent

type StmtParent struct {
	Top
}

type SubExpr

type SubExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*SubExpr) GetOp

func (e *SubExpr) GetOp() string

type Top

type Top struct {
	BaseTop
	File string
}

type UnsignedRightShiftExpr

type UnsignedRightShiftExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*UnsignedRightShiftExpr) GetOp

func (e *UnsignedRightShiftExpr) GetOp() string

type WhileStmt

type WhileStmt struct {
	ConditionalStmt
}

func (*WhileStmt) GetAPrimaryQlClass

func (whileStmt *WhileStmt) GetAPrimaryQlClass() string

func (*WhileStmt) GetCondition

func (whileStmt *WhileStmt) GetCondition() *Expr

func (*WhileStmt) GetHalsteadID

func (whileStmt *WhileStmt) GetHalsteadID() int

func (*WhileStmt) GetPP

func (whileStmt *WhileStmt) GetPP() string

func (*WhileStmt) GetStmt

func (whileStmt *WhileStmt) GetStmt() Stmt

func (*WhileStmt) ToString

func (whileStmt *WhileStmt) ToString() string

type XorBitwiseExpr

type XorBitwiseExpr struct {
	BinaryExpr
	// contains filtered or unexported fields
}

func (*XorBitwiseExpr) GetOp

func (e *XorBitwiseExpr) GetOp() string

type YieldStmt

type YieldStmt struct {
	JumpStmt
	Value *Expr
}

TODO: Implement the SwitchStmt Expr.

func (*YieldStmt) GetAPrimaryQlClass

func (yieldStmt *YieldStmt) GetAPrimaryQlClass() string

func (*YieldStmt) GetHalsteadID

func (yieldStmt *YieldStmt) GetHalsteadID() int

func (*YieldStmt) GetPP

func (yieldStmt *YieldStmt) GetPP() string

func (*YieldStmt) GetValue

func (yieldStmt *YieldStmt) GetValue() *Expr

func (*YieldStmt) ToString

func (yieldStmt *YieldStmt) ToString() string

Jump to

Keyboard shortcuts

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