Author: alexeys
Date: Mon May 1 19:52:46 2006
New Revision: 398780
URL: http://svn.apache.org/viewcvs?rev=398780&view=rev
Log:
Added static accessors to parser handlers.
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java
URL:
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java?rev=398780&r1=398779&r2=398780&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java Mon
May 1 19:52:46 2006
@@ -17,39 +17,19 @@
package org.apache.tools.ant.helper;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
+import org.apache.tools.ant.*;
+import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.JAXPUtils;
+import org.xml.sax.*;
+import org.xml.sax.helpers.DefaultHandler;
+
+import java.io.*;
import java.net.URL;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
import java.util.Stack;
-import org.xml.sax.Locator;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.SAXException;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.apache.tools.ant.util.JAXPUtils;
-import org.apache.tools.ant.util.FileUtils;
-
-import org.apache.tools.ant.ProjectHelper;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.RuntimeConfigurable;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Location;
-import org.apache.tools.ant.UnknownElement;
-
-import org.xml.sax.XMLReader;
-
/**
* Sax2 based project reader
*
@@ -247,6 +227,72 @@
FileUtils.close(inputStream);
}
}
+
+ /**
+ * Returns main handler
+ * @return main handler
+ */
+ protected static AntHandler getMainHandler() {
+ return mainHandler;
+ }
+
+ /**
+ * Sets main handler
+ * @param handler new main handler
+ */
+ protected static void setMainHandler(AntHandler handler) {
+ mainHandler=handler;
+ }
+
+ /**
+ * Returns project handler
+ * @return project handler
+ */
+ protected static AntHandler getProjectHandler() {
+ return projectHandler;
+ }
+
+ /**
+ * Sets project handler
+ * @param handler new project handler
+ */
+ protected static void setProjectHandler(AntHandler handler) {
+ projectHandler=handler;
+ }
+
+ /**
+ * Returns target handler
+ * @return target handler
+ */
+ protected static AntHandler getTargetHandler() {
+ return targetHandler;
+ }
+
+ /**
+ * Sets target handler
+ * @param handler new target handler
+ */
+ protected static void setTargetHandler(AntHandler handler) {
+ targetHandler=handler;
+ }
+
+ /**
+ * Returns element handler
+ * @return element handler
+ */
+ protected static AntHandler getElementHandler() {
+ return elementHandler;
+ }
+
+ /**
+ * Sets element handler
+ * @param handler new element handler
+ */
+ protected static void setElementHandler(AntHandler handler) {
+ elementHandler=handler;
+ }
+
+
/**
* The common superclass for all SAX event handlers used to parse
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]