com.mxgraph.util.svg
Class AbstractParser
- java.lang.Object
-
- com.mxgraph.util.svg.AbstractParser
-
- All Implemented Interfaces:
- Parser
- Direct Known Subclasses:
- NumberParser
public abstract class AbstractParser extends java.lang.Object implements Parser
This class is the superclass of all parsers. It provides localization and error handling methods.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringBUNDLE_CLASSNAMEThe default resource bundle base name.
-
Constructor Summary
Constructors Constructor and Description AbstractParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetCurrent()Returns the current character value.voidparse(java.lang.String s)Parses the given string.voidsetErrorHandler(ErrorHandler handler)Allow an application to register an error event handler.
-
-
-
Field Detail
-
BUNDLE_CLASSNAME
public static final java.lang.String BUNDLE_CLASSNAME
The default resource bundle base name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCurrent
public int getCurrent()
Returns the current character value.
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
Allow an application to register an error event handler.If the application does not register an error event handler, all error events reported by the parser will cause an exception to be thrown.
Applications may register a new or different handler in the middle of a parse, and the parser must begin using the new handler immediately.
- Specified by:
setErrorHandlerin interfaceParser- Parameters:
handler- The error handler.
-
parse
public void parse(java.lang.String s) throws ParseExceptionParses the given string.- Specified by:
parsein interfaceParser- Throws:
ParseException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG