main.go 548 字节
Newer Older
P
Phodal HUANG 已提交
1 2 3
package main

import (
P
Phodal HUANG 已提交
4 5 6 7
	. "../adapter/call"
	. "../adapter/identifier"
	"encoding/json"
	"fmt"
P
Phodal HUANG 已提交
8 9 10
)

func main() {
P
Phodal HUANG 已提交
11 12
	identifierApp := new(JavaIdentifierApp)
	iNodes := identifierApp.AnalysisPath("examples/lambda/LambdaExample.java")
P
Phodal HUANG 已提交
13

P
Phodal HUANG 已提交
14 15 16 17 18 19 20 21 22 23 24 25 26
	var classes []string = nil

	for _, node := range iNodes {
		classes = append(classes, node.Package+"."+node.Name)
	}

	callApp := new(JavaCallApp)
	callNodes := callApp.AnalysisPath("examples/lambda/LambdaExample.java", classes)

	cModel, _ := json.MarshalIndent(callNodes, "", "\t")

	fmt.Println(string(cModel))
}