All pastes #454121 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-04-23 12:51 UTC
rendered paste body
module test
imports libstratego-lib libjava-front

strategies

main = 

  where(cbds := |[ public int f1; public int f2;]|)
  ;
  ! compilation-unit |[
        
        public class Foo {
        
        private Long id;
        
        public void setId(Long id){
           this.id = id;
        }

        public Long getId(){
           return this.id;
        }
       
        ~*cbds
        
        @Override
        public boolean equals(Object o){

          if(o != null && o instanceof Foo){

              return this.id == ((Foo)o).getId();

          } else return false;

        }

       }

      ]|


(gecompileerd met: strc -i test.str -o test -I ~/.nix-profile/share/java-front -I ~/.nix-profile/share/sdf/java-front -la stratego-lib -la ~/.nix-profile/lib/libjava-front.la )