java2ssa

package
v1.4.4-alpha09151 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: AGPL-3.0 Imports: 24 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SERVLET_PATH              = "javax.servlet"
	SERVLET_REQUEST_DISPATHCE = "getRequestDispatcher"
	SERVLET_TEMPLATE_PREFIX   = "webapp"
)
View Source
const (
	SPRING_PATH          = "org.springframework"
	SPRING_UI_MODEL_NAME = "org.springframework.ui.Model"
)
View Source
const (
	FrameworkSupportJAVAEE     = "java_ee"
	FrameworkSupportSpringBoot = "spring_boot"
)
View Source
const FRAMEWORK_DEFAULT_CLASSPATH = "src/main"

Variables

View Source
var INNER_CLASS_SPLIT = "$"
View Source
var ServletAnnotationMap = map[string]bool{
	"HandlesTypes":         true,
	"HttpConstraint":       true,
	"HttpMethodConstraint": true,
	"MultipartConfig":      true,
	"ServletSecurity":      true,
	"WebFilter":            true,
	"WebInitParam":         true,
	"WebListener":          true,
	"WebServlet":           true,
}
View Source
var SpringFrameworkAnnotationMap = map[string]bool{
	"CrossOrigin":                          true,
	"InitBinder":                           true,
	"ExceptionHandlerReflectiveProcessor":  true,
	"RequestBody":                          true,
	"PathVariable":                         true,
	"package-info":                         true,
	"ModelAttribute":                       true,
	"RequestAttribute":                     true,
	"RequestHeader":                        true,
	"ExceptionHandler":                     true,
	"ControllerMappingReflectiveProcessor": true,
	"GetMapping":                           true,
	"Mapping":                              true,
	"MatrixVariable":                       true,
	"DeleteMapping":                        true,
	"CookieValue":                          true,
	"BindParam":                            true,
	"PostMapping":                          true,
	"PutMapping":                           true,
	"ControllerAdvice":                     true,
	"PatchMapping":                         true,
	"RequestMapping":                       true,
	"RequestMethod":                        true,
	"RequestParam":                         true,
	"RequestPart":                          true,
	"ResponseBody":                         true,
	"ResponseStatus":                       true,
	"RestController":                       true,
	"RestControllerAdvice":                 true,
	"SessionAttribute":                     true,
	"SessionAttributes":                    true,
	"ValueConstants":                       true,
}

Functions

func CreateBuilder

func CreateBuilder() ssa.Builder

func Frontend added in v1.3.2

func Frontend(src string, ssabuilder ...*SSABuilder) (javaparser.ICompilationUnitContext, error)

func ShowJavaCompilingCost

func ShowJavaCompilingCost()

func TypeAddBracketLevel

func TypeAddBracketLevel(typ ssa.Type, level int) ssa.Type

Types

type AnnotationDescription

type AnnotationDescription struct {
	Name string
}

type HookMemberCallMethodFunc

type HookMemberCallMethodFunc = func(*singleFileBuilder, ssa.Value, ssa.Value, ...ssa.Value)

type HookReturnFunc

type HookReturnFunc = func(*singleFileBuilder, ssa.Value)

type Ithrows

type Ithrows interface {
	THROWS() antlr.TerminalNode
	QualifiedNameList() javaparser.IQualifiedNameListContext
}

type JavaFramework

type JavaFramework struct {
	// contains filtered or unexported fields
}

type JavaSwitchLabel

type JavaSwitchLabel string
const (
	CASE    JavaSwitchLabel = "case"
	DEFAULT                 = "default"
)

type SSABuilder added in v1.3.3

type SSABuilder struct {
	*ssa.PreHandlerBase
}

func (*SSABuilder) BuildFromAST

func (*SSABuilder) BuildFromAST(raw ssa.FrontAST, b *ssa.FunctionBuilder) error

func (*SSABuilder) FilterFile added in v1.3.3

func (*SSABuilder) FilterFile(path string) bool

func (*SSABuilder) FilterPreHandlerFile

func (*SSABuilder) FilterPreHandlerFile(path string) bool

func (*SSABuilder) GetLanguage

func (*SSABuilder) GetLanguage() consts.Language

func (*SSABuilder) ParseAST

func (s *SSABuilder) ParseAST(src string) (ssa.FrontAST, error)

func (*SSABuilder) PreHandlerFile

func (s *SSABuilder) PreHandlerFile(ast ssa.FrontAST, editor *memedit.MemEditor, builder *ssa.FunctionBuilder)

func (*SSABuilder) PreHandlerProject

func (s *SSABuilder) PreHandlerProject(fileSystem fi.FileSystem, ast ssa.FrontAST, fb *ssa.FunctionBuilder, editor *memedit.MemEditor) error

Jump to

Keyboard shortcuts

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