Is it possible to change Java syntax within a project? -


is there way define custom syntax given java project?

for example, 1 thing able create short-hand syntax standard getters , setters (similar .net's "{ get; set; }"). i've been searching, i've come across writing dsl might able accomplish this, looking them, don't know suit need.

so there way define syntactical elements this?

since others have established changing syntax not possible, might interested in project lombok.

from getting started guide:

private boolean employed = true; private string name;  public boolean isemployed() {     return employed; }  public void setemployed(final boolean employed) {     this.employed = employed; }  protected void setname(final string name) {     this.name = name; } 

becomes

@getter @setter private boolean employed = true; @setter(accesslevel.protected) private string name; 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -