Target selectors are strings used in Mixin to specify a class member. In the simplest case, when a member is unambiguous when referred to by name alone, its name is its target selector. This is usually good enough for method but not good enough for injection point targets, which need fully specified owners and types.

The unique format used to represent type signatures is documented in JVM Spec Chapter 4. The class File Format and duplicated here in a terser format for your convenience.

A field's type signature is seperated from its name with a : and its syntax is summarized by the following set of examples:

sigil meaning
B byte
C char
D double
F float
I int
J long
S short
Z boolean
Lpath/to/Class; Class (instance)
[I int[]
[[Lpath/to/Class; Class[][]

Note the use of slashes rather than dots in class paths, the requirement to fully specify said path, and the behavior of [ as a modifier for whatever is directly after it.

The field's owner comes before its name, and you can specify it either like Lpath/to/Class;fieldName or with the more familiar path.to.Class.fieldName Java syntax. You may not use the latter path syntax in the type signature.

As a full example, long[] field inside some class path.to.Class would be specified like Lpath/to/Class;field:[J.


A method is specified similarly, but its type signature is composed of several field specifiers signifying its arguments and its return type. The arguments are specified in parentheses directly after the name of the function, and its return type after that.

The extra sigil V can be used to represent the void return type.

An example: void method(double x, Object o, int[] xs) inside some class path.to.Class is specified like Lpath/to/Class;method(DLjava/lang/Object;[I)V.

To target a constructor, the special name <init> is used. Static field initializers and the static {} block are targeted with <clinit>.


In most cases except in injection point specifiers, you can omit any of the owner, name, or signature in your target selectors. If this causes ambiguity, the first match found will be selected. Or, if you append a * to the member name, all matches will be selected.