class MyClass {
private int amount;
public int amount() { return amount; }
}
with template
Amount: <myClass.amount>
does not yield the amount value into my resulting templated file. However, if I change MyClass to
class MyClass {
private int amount;
public int getAmount() { return amount; }
}
(note the getAmount) it works. In other words, class.property does not map to myClass.property().
Since java projects exist which use the convention not to use prefixes (ANTLR v4.7 included), I suggest support for this. In my usecase, generating some java code from an ANTLR AST requires me to build an intermediate model, which is cumbersome, error-prone, less readable and harder to debug.
Consider
with template
does not yield the amount value into my resulting templated file. However, if I change MyClass to
(note the getAmount) it works. In other words,
class.property
does not map tomyClass.property()
.Since java projects exist which use the convention not to use prefixes (ANTLR v4.7 included), I suggest support for this. In my usecase, generating some java code from an ANTLR AST requires me to build an intermediate model, which is cumbersome, error-prone, less readable and harder to debug.