Browse Source

Added static accessors to parser handlers.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@398780 13f79535-47bb-0310-9956-ffa450edef68
master
Alexey N. Solofnenko 19 years ago
parent
commit
0ee0b54fd4
1 changed files with 73 additions and 27 deletions
  1. +73
    -27
      src/main/org/apache/tools/ant/helper/ProjectHelper2.java

+ 73
- 27
src/main/org/apache/tools/ant/helper/ProjectHelper2.java View File

@@ -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
*
@@ -248,6 +228,72 @@ public class ProjectHelper2 extends ProjectHelper {
}
}

/**
* 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
* the configuration file.


Loading…
Cancel
Save