|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jtool.jxplatform.wrapper.JxElement
org.jtool.jxplatform.wrapper.JxFile
An object wrapping the File element.
| Field Summary | |
protected org.w3c.dom.Element[] |
classElems
Elements of classes defined in this file. |
protected JxClassList |
classes
Classes and interfaces defined in this file. |
protected java.lang.String[] |
importNames
The names of packeges and classes imported by this file. |
protected org.w3c.dom.Element[] |
interfaceElems
Elements of interfaces defined in this file. |
protected java.lang.String |
packageName
The name of a package where this file exists in. |
protected java.lang.String |
pathName
The pathname of this file. |
| Fields inherited from class org.jtool.jxplatform.wrapper.JxElement |
element |
| Constructor Summary | |
protected |
JxFile()
Creates a new, empty object. |
protected |
JxFile(org.w3c.dom.Element elem)
Creates a new object wrapping a File element. |
| Method Summary | |
boolean |
enclose(org.w3c.dom.Element elem)
Tests if this file element encloses a given element. |
boolean |
equals(JxFile jfile)
Tests if a given file wrapper equals to this one. |
org.w3c.dom.Element[] |
getAllClassAndInterfaceElements()
Returns the elements of all class and interface declarations contained in this file. |
org.w3c.dom.Element[] |
getAllClassElements()
Returns the elements of all class declarations contained in this file. |
org.w3c.dom.Element[] |
getAllImportElements()
Returns an array of import declaration elements of this file. |
org.w3c.dom.Element[] |
getAllInterfaceElements()
Returns the elements of all interface declarations contained in this file. |
JxClassList |
getAllJxClasses()
Returns the wrapper list of all classes and interfaces within this file. |
java.lang.String |
getDirName()
Returns the directory name in which this file exists. |
static org.w3c.dom.Element |
getFileElement(org.w3c.dom.Element elem)
Returns the File element containing a given element. |
java.lang.String[] |
getImportNames()
Returns an array of import names of this file. |
JxClass |
getJxClass()
Obtains a class wrapper defining this file element. |
JxClass |
getJxClass(java.lang.String name)
Returns a wrapper for a class with a given name. |
org.w3c.dom.Element |
getJxClassById(java.lang.String id)
Returns the element for a class with a given name. |
JxMethod |
getJxMethod()
Obtains a method wrapper defining this file element. |
java.lang.String |
getName()
Returns the name of this file. |
org.w3c.dom.Element |
getPackageElement()
Returns the package declaration element of this file. |
java.lang.String |
getPackageName()
Returns the package name of this file. |
java.lang.String |
getPathName()
Returns the path name of this file. |
java.lang.String |
getProjectName()
Returns the project name of this file. |
java.lang.String[] |
getReferencedFileNames()
Obtains the array of the filenames of all classes and interfaces referenced by this file. |
java.lang.String[] |
getReferencedTypeNames()
Obtains the array of the fully qualified names of all the classes and interfaces referenced by this file. |
static boolean |
isFile(org.w3c.dom.Element elem)
Tests if a given element is the File element. |
void |
print()
Displays information about this file wrapper for debugging. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String pathName
protected java.lang.String packageName
protected java.lang.String[] importNames
protected org.w3c.dom.Element[] classElems
protected org.w3c.dom.Element[] interfaceElems
protected JxClassList classes
| Constructor Detail |
protected JxFile()
protected JxFile(org.w3c.dom.Element elem)
throws JxWrapperException
File element.
elem - An DOM element to be wrapped.
JxWrapperException - if the specified element is not valid.| Method Detail |
public java.lang.String getPathName()
public java.lang.String getName()
public java.lang.String getDirName()
public java.lang.String getProjectName()
public static boolean isFile(org.w3c.dom.Element elem)
File element.
elem - An element of the DOM.
File, otherwise false.public static org.w3c.dom.Element getFileElement(org.w3c.dom.Element elem)
File element containing a given element.
elem - An element of the DOM.
File element, or null if there is no such element.public boolean equals(JxFile jfile)
jfile - A file wrapper.
true if the file wrapper equals to this one.public boolean enclose(org.w3c.dom.Element elem)
elem - An element of the DOM.
true if this element encloses the element, otherwise false.public org.w3c.dom.Element getPackageElement()
Package element, null if there is no package declaration element.public java.lang.String getPackageName()
null if there is no file containing the element.public org.w3c.dom.Element[] getAllImportElements()
Import elements.
The size of the array equals to 0 if there is no import declaration element.public java.lang.String[] getImportNames()
null.public org.w3c.dom.Element[] getAllClassElements()
Class elements.public org.w3c.dom.Element[] getAllInterfaceElements()
Intf elements.public org.w3c.dom.Element[] getAllClassAndInterfaceElements()
Class and Intf elements.
public JxClassList getAllJxClasses()
throws JxWrapperException
JxWrapperException - if creation of the class wrapper fails.public JxClass getJxClass(java.lang.String name)
name - The fully-qualified or simple name of a class to be retrieved.
JxClass wrapper, null if there is no element found.public org.w3c.dom.Element getJxClassById(java.lang.String id)
id - The indetifier of a class to be retrieved.
null if there is no element found.public java.lang.String[] getReferencedTypeNames()
public java.lang.String[] getReferencedFileNames()
public JxClass getJxClass()
getJxClass in class JxElementnull.public JxMethod getJxMethod()
getJxMethod in class JxElementnull.public void print()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||