1 28 29 package com.idaremedia.antx.starters; 30 31 import org.apache.tools.ant.BuildException; 32 import org.apache.tools.ant.Project; 33 34 47 48 public abstract class StrictInnerTaskSet extends TaskSet implements StrictInnerTask 49 { 50 54 protected StrictInnerTaskSet(String iam) 55 { 56 super(iam); 57 } 58 59 63 protected StrictInnerTaskSet(String iam, boolean delayConfiguration) 64 { 65 super(iam,delayConfiguration); 66 } 67 68 69 72 public final StrictOuterTask getEnclosingTask() 73 { 74 return m_enclosingTask; 75 } 76 77 78 82 public final void setEnclosingTask(StrictOuterTask owner) 83 { 84 m_enclosingTask = owner; 85 } 86 87 88 94 protected void verifyCanExecute_(String calr) 95 throws BuildException 96 { 97 super.verifyCanExecute_(calr); 98 99 if (getEnclosingTask()==null) { 100 String ermsg = uistrs().get("task.only.in.outer",getTaskName()); 101 log(ermsg, Project.MSG_ERR); 102 throw new BuildException(ermsg,getLocation()); 103 } 104 } 105 106 107 private StrictOuterTask m_enclosingTask; 108 } 109 110 111 | Popular Tags |