Skip to content
Tom Martin edited this page Jul 22, 2025 · 13 revisions

Developers may find the Intellij plugin useful: DASM Development, it comes with auto-complete and useful errors/warnings about improper DASM usage.

At its core DASM is a java templating library that uses code not written as a template as a template.

There are two key DASM concepts, the Redirect and the Transform:

  • A Redirect allows you to specify a how a method should be changed
  • A Transform tells DASM to apply a set of redirects to a target

Important

DASM acts on bytecode, in which methods/fields are referenced not just by name but by their exact parameters/type.

As a result if you have a field private Foo foo; and want to redirect it to private Bar bar; both a field redirect from foo -> bar and a type redirect from Foo -> Bar are required. The same applies to method names and method parameters etc.

Otherwise the bytecode will reference bar as if it was a Foo which makes no sense


Intro

First see this Quick Example

Full Docs

Redirects

Transforms

Clone this wiki locally