Skip to main content

generate-classes

Generate bytecode classes from DSL scripts (MAL, OAL, LAL, Hierarchy). Runs the compiler and dumps .class files for inspection.

来源信息

仓库
apache/skywalking
最近来源活动
2026年4月2日 03:59
检测到的 SKILL.md 语言
英语
星标
24,969
分支
6,630

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
generate-classes
description
Generate bytecode classes from DSL scripts (MAL, OAL, LAL, Hierarchy). Runs the compiler and dumps .class files for inspection.
argument-hint
<mal|oal|lal|hierarchy|all>
# Generate DSL Classes Run the v2 compiler (ANTLR4 + Javassist) to generate bytecode classes from DSL scripts and dump `.class` files to disk for inspection. ## Commands by argument ### `mal` — MAL expression classes ```bash ./mvnw test -pl oap-server/analyzer/dsl-scripts-test \ -Dtest=MALExpressionExecutionTest -DfailIfNoTests=false -Dcheckstyle.skip ``` Output location: `oap-server/analyzer/dsl-scripts-test/src/test/resources/scripts/mal/**/*.generated-classes/` ### `oal` — OAL metrics/dispatcher/builder classes ```bash ./mvnw test -pl oap-server/oal-rt \ -Dtest=RuntimeOALGenerationTest -DfailIfNoTests=false -Dcheckstyle.skip ``` Output location: `oap-server/oal-rt/target/test-classes/metrics/`, `metrics/builder/`, `dispatcher/` ### `lal` — LAL filter/extractor classes ```bash ./mvnw test -pl oap-server/analyzer/dsl-scripts-test \ -Dtest=LALExpressionExecutionTest -DfailIfNoTests=false -Dcheckstyle.skip ``` Output location: `oap-server/analyzer/dsl-scripts-test/src/test/resources/scripts/lal/**/*.generated-classes/` ### `hierarchy` — Hierarchy rule classes ```bash ./mvnw test -pl oap-server/analyzer/dsl-scripts-test \ -Dtest=HierarchyRuleExecutionTest -DfailIfNoTests=false -Dcheckstyle.skip ``` Output location: `oap-server/analyzer/dsl-scripts-test/src/test/resources/scripts/hierarchy-rule/*.generated-classes/` ### `all` or no argument — generate all DSLs Run all four commands above sequentially. ## After generation Print the output location for the requested DSL so the user knows where to find the generated `.class` files. Use `javap` to decompile: ```bash javap -c -p <path-to-class-file> ``` ## Cleaning generated classes ```bash ./mvnw clean -pl oap-server/analyzer/dsl-scripts-test ```
在 GitHub 查看