public class CompletionXMLParser
extends org.xml.sax.helpers.DefaultHandler
CompletionXml.dtd
DTD
found in this package.构造器和说明 |
---|
CompletionXMLParser(CompletionProvider provider)
Constructor.
|
CompletionXMLParser(CompletionProvider provider,
java.lang.ClassLoader cl)
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
void |
characters(char[] ch,
int start,
int length)
Called when character data inside an element is found.
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Called when an element is closed.
|
void |
error(org.xml.sax.SAXParseException e) |
java.util.List<Completion> |
getCompletions()
Returns the completions found after parsing the XML.
|
char |
getParamEndChar()
Returns the parameter end character specified.
|
java.lang.String |
getParamSeparator()
Returns the parameter end string specified.
|
char |
getParamStartChar()
Returns the parameter start character specified.
|
void |
reset(CompletionProvider provider)
Resets this parser to grab more completions.
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicID,
java.lang.String systemID) |
static void |
setDefaultCompletionClassLoader(java.lang.ClassLoader cl)
Sets the class loader to use when loading custom classes to use for
various
Completion types, such as FunctionCompletion s,
from XML. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
Called when an element starts.
|
void |
warning(org.xml.sax.SAXParseException e) |
public CompletionXMLParser(CompletionProvider provider)
provider
- The provider to get completions for.reset(CompletionProvider)
public CompletionXMLParser(CompletionProvider provider, java.lang.ClassLoader cl)
provider
- The provider to get completions for.cl
- The class loader to use, if necessary, when loading classes
from the XML (custom FunctionCompletion
s, for example).
This may be null
if the default is to be used, or
if the XML does not define specific classes for completion types.reset(CompletionProvider)
public void characters(char[] ch, int start, int length)
characters
在接口中 org.xml.sax.ContentHandler
characters
在类中 org.xml.sax.helpers.DefaultHandler
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
endElement
在接口中 org.xml.sax.ContentHandler
endElement
在类中 org.xml.sax.helpers.DefaultHandler
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
error
在接口中 org.xml.sax.ErrorHandler
error
在类中 org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public java.util.List<Completion> getCompletions()
public char getParamEndChar()
public java.lang.String getParamSeparator()
null
if none was specified.public char getParamStartChar()
public void reset(CompletionProvider provider)
provider
- The new provider to get completions for.public org.xml.sax.InputSource resolveEntity(java.lang.String publicID, java.lang.String systemID) throws org.xml.sax.SAXException
resolveEntity
在接口中 org.xml.sax.EntityResolver
resolveEntity
在类中 org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public static void setDefaultCompletionClassLoader(java.lang.ClassLoader cl)
Completion
types, such as FunctionCompletion
s,
from XML.Users should very rarely have a need to use this method.
cl
- The class loader to use. If this is null
, then
a default is used.public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs)
startElement
在接口中 org.xml.sax.ContentHandler
startElement
在类中 org.xml.sax.helpers.DefaultHandler
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
warning
在接口中 org.xml.sax.ErrorHandler
warning
在类中 org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException