java2ssa

package
v1.4.2-alpha07071 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: AGPL-3.0 Imports: 25 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 Builder ssa.Builder = &SSABuilder{}
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 Frontend added in v1.3.2

func Frontend(src string, force bool) (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(*builder, ssa.Value, ssa.Value, ...ssa.Value)

type HookReturnFunc

type HookReturnFunc = func(*builder, 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.PreHandlerInit
}

func (*SSABuilder) Build added in v1.3.3

func (*SSABuilder) Build(src string, force bool, b *ssa.FunctionBuilder) error

func (*SSABuilder) Create

func (s *SSABuilder) Create() ssa.Builder

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) PreHandlerFile

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

func (*SSABuilder) PreHandlerProject

func (s *SSABuilder) PreHandlerProject(fileSystem fi.FileSystem, fb *ssa.FunctionBuilder, path string) error

Jump to

Keyboard shortcuts

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