自賛

この設計が当たりだったかもという。

/**
 * method.parameters.type = ({@link String}, {@link String})
 */
public void hack(CtMethod<?> method)

これは下記と等価です。

/**
 * method.parameters[0].type = {@link String}
 * method.parameters[1].type = {@link String}
 */
public void hack(CtMethod<?> method)

解釈としては:

  1. method : ({ method ∈ UNIVERSE | method は任意のメソッド })
  2. method.parameters : ある method の引数リスト
  3. method.parameters.type : ある method の引数リストの各要素に".type"を適用したリスト

といった具合に、

/**
 * list = (a, b, c).type
 */

と言った具合に、リストに適用されるプロパティは

/**
 * list = (a.type, b.type, c.type)
 */

リストの各要素に適用するものとみなします (プロパティの実装次第ではありますが)。

関数型言語*1だと標準装備なんですけどねぇ…。map type [a, b, c] とか。
java.util.Collectionにも似たようなのが欲しいところ。

*1:λ...