org.jtool.jxplatform.wrapper
Class JxBinaryMethod

java.lang.Object
  extended byorg.jtool.jxplatform.wrapper.JxElement
      extended byorg.jtool.jxplatform.wrapper.JxMethod
          extended byorg.jtool.jxplatform.wrapper.JxBinaryMethod

public class JxBinaryMethod
extends JxMethod

An object wrapping a Method element of an XML document generated from a binary file. The methods in the binary file has no Param. Information about parameters is untrusted.

Author:
Katsuhisa Maruyama

Field Summary
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxMethod
faccessElems, fqn, innerclassElems, localElems, mcallElems, name, parameterElems, signature, throwElems, type, vaccessElems
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxElement
element
 
Constructor Summary
protected JxBinaryMethod()
          Creates a new, empty object.
protected JxBinaryMethod(org.w3c.dom.Element elem)
          Creates a new object wrapping a binary Method or Ctor element.
 
Method Summary
 org.w3c.dom.Element[] getAllFieldAccessElements()
          Returns elements of field accesses contained in this method.
 org.w3c.dom.Element[] getAllInnerClassElements()
          Returns elements of inner classes contained in this method.
 org.w3c.dom.Element[] getAllLocalElements()
          Returns the elements of all local variable declarations contained in this method.
 org.w3c.dom.Element[] getAllMethodCallElements()
          Returns elements of method calls contained in this method.
 org.w3c.dom.Element[] getAllParameterElements()
          Returns the elements of all parameter declarations contained in this method.
 org.w3c.dom.Element[] getAllStatementElements()
          Returns elements of statements contained in this method.
 org.w3c.dom.Element[] getAllVariableAccessElements()
          Returns elements of variable accesses contained in this method.
 JxVariableList getDefinedJxVariables()
          Returns variable accesses the value of which is defined in this method.import org.jtool.jxplatform.dom.JxConstants;
 JxClass getJxClass()
          Obtains a class wrapper defining this method.
 JxVariableList getJxVariables()
          Returns variable appearing in this method.
 int getNumOfParameters()
          Returns the number of parameters of this method.
 JxParameter getParameter(int index)
          Returns the parameter at the specified position.
 JxParameter getParameter(java.lang.String name)
          Returns the element for a parameter with a given name.
 org.w3c.dom.Element getParameterById(java.lang.String id)
          Returns the element for a parameter with a given identifier.
 java.lang.String getParameterTypes()
          Returns the types of all parameters of this method.
 java.lang.String getTypeName()
          Returns the fully qualified name of the return type of this method.
 JxVariableList getUsedJxVariables()
          Returns variable accesses the value of which is used in this method.
 int indexOf(JxParameter jp)
          Returns the position of the specified parameter in parameters of this method.
 void print()
          Displays information about this method wrapper for debugging.
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxMethod
enclose, equals, getAccess, getAllThrowElements, getMethodElement, getModifier, getName, getNameNode, getSignature, getThrowTypes, getTypeFqn, isAbstract, isConstructor, isDefault, isFinal, isMethod, isMethodOrConstructor, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isVoid, throwsException
 
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, getJxMethod, getJxStaticInit, getKeyword, getLine, getMethodElement, getStatementElement, getStaticInitElement, getTypeElement, getTypeElements, 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

JxBinaryMethod

protected JxBinaryMethod()
Creates a new, empty object.


JxBinaryMethod

protected JxBinaryMethod(org.w3c.dom.Element elem)
                  throws JxWrapperException
Creates a new object wrapping a binary Method or Ctor element.

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

getTypeName

public java.lang.String getTypeName()
Returns the fully qualified name of the return type of this method.

Overrides:
getTypeName in class JxMethod
Returns:
The fully-qualified name string.
See Also:
JxMethod.getTypeName()

getJxClass

public JxClass getJxClass()
Obtains a class wrapper defining this method.

Overrides:
getJxClass in class JxMethod
Returns:
The JavaClass wrapper defining this method.
See Also:
JxMethod.getJxClass()

getAllParameterElements

public org.w3c.dom.Element[] getAllParameterElements()
Returns the elements of all parameter declarations contained in this method.

Overrides:
getAllParameterElements in class JxMethod
Returns:
Always an array since this method does not intend to be called.
See Also:
JxMethod.getAllParameterElements()

getAllLocalElements

public org.w3c.dom.Element[] getAllLocalElements()
Returns the elements of all local variable declarations contained in this method.

Overrides:
getAllLocalElements in class JxMethod
Returns:
Always an empty array since this method does not intend to be called.
See Also:
JxMethod.getAllLocalElements()

getParameterTypes

public java.lang.String getParameterTypes()
Returns the types of all parameters of this method.

Overrides:
getParameterTypes in class JxMethod
Returns:
Always the empty string since this method does not intend to be called.
See Also:
JxMethod.getParameterTypes()

getNumOfParameters

public int getNumOfParameters()
Returns the number of parameters of this method.

Overrides:
getNumOfParameters in class JxMethod
Returns:
Always 0 since this method does not intend to be called.
See Also:
JxMethod.getNumOfParameters()

getParameter

public JxParameter getParameter(int index)
Returns the parameter at the specified position.

Overrides:
getParameter in class JxMethod
Parameters:
index - The position of the specified parameter.
Returns:
The DOM element, null if there is no element found.
See Also:
JxMethod.getParameter(int)

getParameter

public JxParameter getParameter(java.lang.String name)
Returns the element for a parameter with a given name.

Overrides:
getParameter in class JxMethod
Parameters:
name - The name of a parameter to be retrieved.
Returns:
Always null since this method does not intend to be called.
See Also:
JxMethod.getParameter(String)

getParameterById

public org.w3c.dom.Element getParameterById(java.lang.String id)
Returns the element for a parameter with a given identifier.

Overrides:
getParameterById in class JxMethod
Parameters:
id - The identifier of a parameter to be retrieved.
Returns:
Always null since this method does not intend to be called.
See Also:
JxMethod.getParameterById(String)

indexOf

public int indexOf(JxParameter jp)
Returns the position of the specified parameter in parameters of this method.

Overrides:
indexOf in class JxMethod
Parameters:
jp - A parameter wrapper.
Returns:
Always -1 since this method does not intend to be called.
See Also:
JxMethod.indexOf(JxParameter)

getAllStatementElements

public org.w3c.dom.Element[] getAllStatementElements()
Returns elements of statements contained in this method.

Overrides:
getAllStatementElements in class JxMethod
Returns:
Alaways an empty array since this method does not intend to be called.
See Also:
JxMethod.getAllStatementElements()

getAllMethodCallElements

public org.w3c.dom.Element[] getAllMethodCallElements()
Returns elements of method calls contained in this method.

Overrides:
getAllMethodCallElements in class JxMethod
Returns:
Alaways an empty array since this method does not intend to be called.
See Also:
JxMethod.getAllMethodCallElements()

getAllFieldAccessElements

public org.w3c.dom.Element[] getAllFieldAccessElements()
Returns elements of field accesses contained in this method.

Overrides:
getAllFieldAccessElements in class JxMethod
Returns:
Alaways an empty array since this method does not intend to be called.
See Also:
JxMethod.getAllFieldAccessElements()

getAllVariableAccessElements

public org.w3c.dom.Element[] getAllVariableAccessElements()
Returns elements of variable accesses contained in this method.

Overrides:
getAllVariableAccessElements in class JxMethod
Returns:
Alaways an empty array since this method does not intend to be called.
See Also:
JxMethod.getAllVariableAccessElements()

getDefinedJxVariables

public JxVariableList getDefinedJxVariables()
                                     throws JxWrapperException
Returns variable accesses the value of which is defined in this method.import org.jtool.jxplatform.dom.JxConstants;

Overrides:
getDefinedJxVariables in class JxMethod
Returns:
Alaways an empty collection of JxVariable since this method does not intend to be called.
Throws:
JxWrapperException - if the creation of a variable access wrapper fails.
See Also:
JxMethod.getDefinedJxVariables()

getUsedJxVariables

public JxVariableList getUsedJxVariables()
Returns variable accesses the value of which is used in this method.

Overrides:
getUsedJxVariables in class JxMethod
Returns:
Alaways an empty collection of JxVariable since this method does not intend to be called.
See Also:
JxMethod.getUsedJxVariables()

getJxVariables

public JxVariableList getJxVariables()
Returns variable appearing in this method.

Overrides:
getJxVariables in class JxMethod
Returns:
Always an empty collection of JxVariable since this method does not intend to be called.
See Also:
JxMethod.getJxVariables()

getAllInnerClassElements

public org.w3c.dom.Element[] getAllInnerClassElements()
Returns elements of inner classes contained in this method.

Overrides:
getAllInnerClassElements in class JxMethod
Returns:
Always an empty array of inner classes since this method does not intend to be called.
See Also:
JxMethod.getAllInnerClassElements()

print

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

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