Skip to content

Commit f774172

Browse files
authored
Merge pull request #44 from SpringKill-team/dev
Dev
2 parents 37377c7 + 16131b0 commit f774172

17 files changed

Lines changed: 829 additions & 181 deletions

File tree

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/intellij-javadocs-4.0.1.xml

Lines changed: 204 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/kotlin/org/skgroup/securityinspector/analysis/ast/nodes/MethodNode.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@ data class MethodNode(
2121
val parameters: List<ParameterNode>,
2222
val body: List<AstNode> = emptyList(),
2323
val refMode: RefMode,
24+
var signature: String = "",
2425
override val sourceSpan: SourceSpan? = null
2526
) : BaseAstNode(
2627
nodeType = "MethodDeclaration",
2728
children = body,
2829
sourceSpan = sourceSpan
2930
){
31+
init {
32+
signature = "$className.$name(${parameters.joinToString { it.type }})"
33+
}
3034
override fun toString(): String {
3135
return "MethodNode(className='$className', name='$name', returnType='$returnType', parameters=$parameters, body=$body, sourceSpan=$sourceSpan)"
3236
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package org.skgroup.securityinspector.analysis.ast.nodes
2+
3+
import org.skgroup.securityinspector.analysis.ast.SourceSpan
4+
5+
/**
6+
* 类描述:MethodSegNode 类用于保存定位方法的全部有用信息。
7+
*
8+
* @author springkill
9+
* @version 1.0
10+
*/
11+
data class MethodSigNode(
12+
val className: String,
13+
val methodAccessModifier: String,
14+
val methodModifier: String,
15+
val methodName: String,
16+
val methodParams: List<ParameterNode>,
17+
val methodVarargs: Boolean,
18+
val methodThrowsClause: List<String>,
19+
val methodReturnType: String,
20+
val methodAnnotations: List<String>,
21+
val body: List<AstNode> = emptyList(),
22+
override val sourceSpan: SourceSpan? = null
23+
) : BaseAstNode(
24+
nodeType = "MethodSignature",
25+
children = body,
26+
sourceSpan = sourceSpan
27+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package org.skgroup.securityinspector.analysis.graphs.callgraph
2+
3+
import org.skgroup.securityinspector.analysis.ast.nodes.MethodNode
4+
import org.skgroup.securityinspector.enums.EdgeType
5+
6+
/**
7+
* 类描述:CallPair 类用于。
8+
*
9+
* @author springkill
10+
* @version 1.0
11+
* @since 2025/3/29
12+
*/
13+
data class CallEdge(
14+
val caller: MethodNode,
15+
val callee: MethodNode,
16+
val edgeType: EdgeType
17+
)

0 commit comments

Comments
 (0)