| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.apache.openjpa.lib.meta.XMLMetaDataParser
org.apache.openjpa.lib.meta.CFMetaDataParser
public class CFMetaDataParser
Custom SAX parser used by the system to quickly parse metadata files for classes.
| Constructor Summary | |
|---|---|
| CFMetaDataParser() | |
| Method Summary | |
|---|---|
| protected  Class | classForName(String name,
             boolean resolve)Helper method to create the Classfor the given name,
 taking into account the package currently being parsed for relative
 class names. | 
| static Class | classForName(String name,
             String pkg,
             boolean resolve,
             ClassLoader loader)Load the given class name against the given package and the set of accepted standard packages. | 
| protected  String | currentClassName()Return the current class being parsed; the returned name will be fully qualified. | 
| protected  String | currentPackage()Return the current package being parsed. | 
| protected  void | endClass(String elem)End a class. | 
| protected  void | endClassElement(String name)Override this method marking the end of an element within a declared class. | 
| protected  void | endElement(String name)Override this method marking the end of some element. | 
| protected  void | endPackage(String elem)End a package. | 
| protected  void | endPackageElement(String name)Override this method marking the end of an element within a declared package. | 
| protected  void | endSystemElement(String name)Override this method marking the end of an element outside of any package or class. | 
| protected  String | getClassAttributeName()The attribute of the class element that holds the name, or null to use the element text. | 
| protected  int | getClassElementDepth()The depth of the class element. | 
| protected  String | getPackageAttributeName()The attribute of the package element that holds the name, or null to use the element text. | 
| protected  int | getPackageElementDepth()The depth of the package element. | 
| protected  boolean | isClassElementName(String name)The name of the class element. | 
| protected  boolean | isPackageElementName(String name)The name of the package element. | 
| protected  void | reset()Override this method to clear any state and ready the parser for a new document. | 
| protected  boolean | startClass(String elem,
           Attributes attrs)Start a class. | 
| protected  boolean | startClassElement(String name,
                  Attributes attrs)Override this method marking the start of an element within a declared class. | 
| protected  boolean | startElement(String name,
             Attributes attrs)Override this method marking the start of some element. | 
| protected  boolean | startPackage(String elem,
             Attributes attrs)Start a package. | 
| protected  boolean | startPackageElement(String name,
                    Attributes attrs)Override this method marking the start of an element within a declared package. | 
| protected  boolean | startSystemElement(String name,
                   Attributes attrs)Override this method marking the start of an element outside of any package or class. | 
| Methods inherited from class org.apache.openjpa.lib.meta.XMLMetaDataParser | 
|---|
| addComments, addResult, characters, clear, comment, currentClassLoader, currentComments, currentDepth, currentLocation, currentText, endCDATA, endDTD, endElement, endEntity, error, fatalError, finish, getClassLoader, getDocType, getException, getException, getException, getLexicalHandler, getLocation, getLog, getParseComments, getParseText, getResults, getSchemaSource, getSourceFile, getSourceIsSystemId, getSourceName, getSuffix, ignoreContent, isCaching, isValidating, parse, parse, parse, parse, parse, parse, parsed, parseNewResource, setCaching, setClassLoader, setDocumentLocator, setLexicalHandler, setLocation, setLog, setParseComments, setParseText, setSourceIsSystemId, setSuffix, setValidating, startCDATA, startDTD, startElement, startEntity | 
| Methods inherited from class org.xml.sax.helpers.DefaultHandler | 
|---|
| endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public CFMetaDataParser()
| Method Detail | 
|---|
protected boolean isPackageElementName(String name)
protected String getPackageAttributeName()
protected int getPackageElementDepth()
protected boolean isClassElementName(String name)
protected String getClassAttributeName()
protected int getClassElementDepth()
protected boolean startElement(String name,
                               Attributes attrs)
                        throws SAXException
XMLMetaDataParser
startElement in class XMLMetaDataParserSAXException
protected void endElement(String name)
                   throws SAXException
XMLMetaDataParser
endElement in class XMLMetaDataParserSAXException
protected boolean startPackage(String elem,
                               Attributes attrs)
                        throws SAXException
SAXExceptionprotected void endPackage(String elem)
protected boolean startClass(String elem,
                             Attributes attrs)
                      throws SAXException
SAXException
protected void endClass(String elem)
                 throws SAXException
SAXException
protected boolean startSystemElement(String name,
                                     Attributes attrs)
                              throws SAXException
SAXException
protected void endSystemElement(String name)
                         throws SAXException
SAXException
protected boolean startPackageElement(String name,
                                      Attributes attrs)
                               throws SAXException
SAXException
protected void endPackageElement(String name)
                          throws SAXException
SAXException
protected boolean startClassElement(String name,
                                    Attributes attrs)
                             throws SAXException
SAXException
protected void endClassElement(String name)
                        throws SAXException
SAXExceptionprotected void reset()
super.reset() to clear superclass state.
reset in class XMLMetaDataParserprotected String currentClassName()
protected String currentPackage()
protected Class classForName(String name,
                             boolean resolve)
                      throws SAXException
Class for the given name,
 taking into account the package currently being parsed for relative
 class names.
SAXException
public static Class classForName(String name,
                                 String pkg,
                                 boolean resolve,
                                 ClassLoader loader)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||