1 22 package test.dbc.office; 23 24 29 @org.jboss.aspects.dbc.Dbc 30 @org.jboss.aspects.dbc.Invariant ({"$tgt.name != null"}) 31 public class Developer 32 { 33 String name; 34 Computer computer; 35 36 @org.jboss.aspects.dbc.PreCond ({"$0 != null"}) 37 @org.jboss.aspects.dbc.PostCond ({"$0 == $tgt.name"}) 38 public Developer(String name) 39 { 40 this.name = name; 41 } 42 43 @org.jboss.aspects.dbc.PostCond ({"$rtn != null implies ($rtn.getDeveloper() == null) ||($rtn.getDeveloper() == $tgt)"}) 44 public Computer getComputer() 45 { 46 return computer; 47 } 48 49 @org.jboss.aspects.dbc.PostCond ({"$0 == $tgt.getComputer()"}) 50 public void setComputer(Computer computer) 51 { 52 this.computer = computer; 53 } 54 55 } 56 | Popular Tags |