|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 java.lang.Class |
classForName(java.lang.String name,
boolean resolve)
Helper method to create the Class for the given name,
taking into account the package currently being parsed for relative
class names. |
static java.lang.Class |
classForName(java.lang.String name,
java.lang.String pkg,
boolean resolve,
java.lang.ClassLoader loader)
Load the given class name against the given package and the set of accepted standard packages. |
protected java.lang.String |
currentClassName()
Return the current class being parsed; the returned name will be fully qualified. |
protected java.lang.String |
currentPackage()
Return the current package being parsed. |
protected void |
endClass(java.lang.String elem)
End a class. |
protected void |
endClassElement(java.lang.String name)
Override this method marking the end of an element within a declared class. |
protected void |
endElement(java.lang.String name)
Override this method marking the end of some element. |
protected void |
endPackage(java.lang.String elem)
End a package. |
protected void |
endPackageElement(java.lang.String name)
Override this method marking the end of an element within a declared package. |
protected void |
endSystemElement(java.lang.String name)
Override this method marking the end of an element outside of any package or class. |
protected java.lang.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 java.lang.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(java.lang.String name)
The name of the class element. |
protected boolean |
isPackageElementName(java.lang.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(java.lang.String elem,
org.xml.sax.Attributes attrs)
Start a class. |
protected boolean |
startClassElement(java.lang.String name,
org.xml.sax.Attributes attrs)
Override this method marking the start of an element within a declared class. |
protected boolean |
startElement(java.lang.String name,
org.xml.sax.Attributes attrs)
Override this method marking the start of some element. |
protected boolean |
startPackage(java.lang.String elem,
org.xml.sax.Attributes attrs)
Start a package. |
protected boolean |
startPackageElement(java.lang.String name,
org.xml.sax.Attributes attrs)
Override this method marking the start of an element within a declared package. |
protected boolean |
startSystemElement(java.lang.String name,
org.xml.sax.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, 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(java.lang.String name)
protected java.lang.String getPackageAttributeName()
protected int getPackageElementDepth()
protected boolean isClassElementName(java.lang.String name)
protected java.lang.String getClassAttributeName()
protected int getClassElementDepth()
protected boolean startElement(java.lang.String name, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
XMLMetaDataParser
startElement
in class XMLMetaDataParser
org.xml.sax.SAXException
protected void endElement(java.lang.String name) throws org.xml.sax.SAXException
XMLMetaDataParser
endElement
in class XMLMetaDataParser
org.xml.sax.SAXException
protected boolean startPackage(java.lang.String elem, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void endPackage(java.lang.String elem)
protected boolean startClass(java.lang.String elem, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void endClass(java.lang.String elem) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected boolean startSystemElement(java.lang.String name, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void endSystemElement(java.lang.String name) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected boolean startPackageElement(java.lang.String name, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void endPackageElement(java.lang.String name) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected boolean startClassElement(java.lang.String name, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void endClassElement(java.lang.String name) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void reset()
super.reset()
to clear superclass state.
reset
in class XMLMetaDataParser
protected java.lang.String currentClassName()
protected java.lang.String currentPackage()
protected java.lang.Class classForName(java.lang.String name, boolean resolve) throws org.xml.sax.SAXException
Class
for the given name,
taking into account the package currently being parsed for relative
class names.
org.xml.sax.SAXException
public static java.lang.Class classForName(java.lang.String name, java.lang.String pkg, boolean resolve, java.lang.ClassLoader loader)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |