org.jtool.jxplatform.wrapper
Class JxBinaryFile

java.lang.Object
  extended byorg.jtool.jxplatform.wrapper.JxElement
      extended byorg.jtool.jxplatform.wrapper.JxFile
          extended byorg.jtool.jxplatform.wrapper.JxBinaryFile

public class JxBinaryFile
extends JxFile

An object wrapping a File element of an XML document generated from a binary file. The binary file contains only one class or interface.

Author:
Katsuhisa Maruyama

Field Summary
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxFile
classElems, classes, importNames, interfaceElems, packageName, pathName
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxElement
element
 
Constructor Summary
protected JxBinaryFile()
          Creates a new, empty object.
protected JxBinaryFile(org.w3c.dom.Element elem)
          Creates a new object wrapping a binary File element.
 
Method Summary
 org.w3c.dom.Element[] getAllImportElements()
          Returns an array of import declaration elements of this file.
 JxClassList getAllJxClasses()
          Returns the wrapper list of all classes and interfaces within this file.
 org.w3c.dom.Element getClassOrInterfaceElement()
          Returns the Class or Intf element defined in this binary file.
 java.lang.String[] getImportNames()
          Returns an array of import names of this file.
 JxClass getJxBinaryClass()
          Returns a wrapper for a binary class with a given name.
 JxClass getJxClass(java.lang.String name)
          Returns a wrapper for a class with a given name.
 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.
 void print()
          Displays information about this file wrapper for debugging.
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxFile
enclose, equals, getAllClassAndInterfaceElements, getAllClassElements, getAllInterfaceElements, getDirName, getFileElement, getJxClass, getJxClassById, getJxMethod, getName, getPackageElement, getPackageName, getPathName, getProjectName, isFile
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxElement
equals, existInTheSameClass, existInTheSameField, existInTheSameFile, existInTheSameMethod, existsInTheSameClass, existsInTheSameFile, existsInTheSameMethod, existsInTheSamePackage, getArrayOfElements, getChildElement, getChildElement, getChildElements, getChildElements, getChildNodes, getChildNodes, getClassElement, getDescendantElements, getDescendantElements, getDescendantElements, getDescendantElements, getElement, getElementById, getExpressionElements, getFieldElement, getFileElement, getFirstChildElement, getFirstChildElement, getId, getId, getIdentName, getIdentName, getJxField, getJxFile, getJxStaticInit, getKeyword, getLine, getMethodElement, getStatementElement, getStaticInitElement, getTypeElement, getTypeElements, getTypeName, indexOf, indexOf, isBinary, isClass, isClassOrInterface, isConstructor, isExpression, isField, isFile, isImport, isInterface, isInTheSameField, isLocal, isMethod, isMethodOrConstructor, isPackage, isParameter, isStatement, isStaticInit, isTerminalElement, isType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JxBinaryFile

protected JxBinaryFile()
Creates a new, empty object.


JxBinaryFile

protected JxBinaryFile(org.w3c.dom.Element elem)
                throws JxWrapperException
Creates a new object wrapping a binary File element.

Parameters:
elem - An DOM element to be wrapped.
Throws:
JxWrapperException - JxWrapperException if the specified element is not valid.
Method Detail

getClassOrInterfaceElement

public org.w3c.dom.Element getClassOrInterfaceElement()
Returns the Class or Intf element defined in this binary file.

Returns:
The Class or Intf element, or null if there is no such element.

getJxBinaryClass

public JxClass getJxBinaryClass()
Returns a wrapper for a binary class with a given name.

Returns:
The matched JxBinaryClass wrapper, null if there is no element found.

getAllImportElements

public org.w3c.dom.Element[] getAllImportElements()
Returns an array of import declaration elements of this file.

Overrides:
getAllImportElements in class JxFile
Returns:
Always an empty array of Element since a binary class file declares no import package.
See Also:
JxFile.getAllImportElements()

getImportNames

public java.lang.String[] getImportNames()
Returns an array of import names of this file.

Overrides:
getImportNames in class JxFile
Returns:
Always an empty array of String since a binary class file declares no import package.
See Also:
JxFile.getImportNames()

getJxClass

public JxClass getJxClass(java.lang.String name)
Returns a wrapper for a class with a given name.

Overrides:
getJxClass in class JxFile
Parameters:
name - The fully-qualified or simple name of a class to be retrieved.
Returns:
The matched JxBinaryClass wrapper, null if there is no element found.
See Also:
JxFile.getJxClass(String)

getAllJxClasses

public JxClassList getAllJxClasses()
                            throws JxWrapperException
Returns the wrapper list of all classes and interfaces within this file.

Overrides:
getAllJxClasses in class JxFile
Returns:
The wrapper list of the classes and interfaces.
Throws:
JxWrapperException - if creation of the class wrapper fails.
See Also:
JxFile.getAllJxClasses()

getReferencedTypeNames

public java.lang.String[] getReferencedTypeNames()
Obtains the array of the fully qualified names of all the classes and interfaces referenced by this file.

Overrides:
getReferencedTypeNames in class JxFile
Returns:
Always an empty array of String since the DOM document for a binary class file has no TypeLoc element.
See Also:
JxFile.getReferencedTypeNames()

getReferencedFileNames

public java.lang.String[] getReferencedFileNames()
Obtains the array of the filenames of all classes and interfaces referenced by this file.

Overrides:
getReferencedFileNames in class JxFile
Returns:
Always an empty array of String since the DOM document for a binary class file has no TypeLoc element.
See Also:
JxFile.getReferencedFileNames()

print

public void print()
Displays information about this file wrapper for debugging.

Overrides:
print in class JxFile
See Also:
JxFile.print()