1 package jfun.yan.xml.nuts; 2 3 import jfun.yan.Binder; 4 import jfun.yan.Component; 5 6 24 public class BindNut extends DelegatingNut { 25 private Binder binder; 26 private boolean followup = false; 27 28 public boolean isFollowup() { 29 return followup; 30 } 31 32 public void setFollowup(boolean followup) { 33 this.followup = followup; 34 } 35 36 public Binder getBinder() { 37 return binder; 38 } 39 40 public void setBinder(Binder binder) { 41 this.binder = binder; 42 } 43 44 45 public Component eval(){ 46 final Component c1 = getMandatory(); 47 checkMandatory("binder", binder); 48 return followup?c1.followedBy(binder):c1.bind(binder); 49 } 50 51 } 52 | Popular Tags |