org.jtool.jxplatform.wrapper
Class JxMethodCall

java.lang.Object
  extended byorg.jtool.jxplatform.wrapper.JxElement
      extended byorg.jtool.jxplatform.wrapper.JxDefUseExpression
          extended byorg.jtool.jxplatform.wrapper.JxExpression
              extended byorg.jtool.jxplatform.wrapper.JxMethodCall

public class JxMethodCall
extends JxExpression


Field Summary
protected  org.w3c.dom.Element[] arguments
          The elements of arguments of this method call.
protected  java.lang.String binding
          The binding information about this method call.
protected  org.w3c.dom.Element declaration
          The element of the element of a called method.
protected  java.lang.String defid
          The identifier string of the element of a called method.
protected  java.lang.String fqn
          The fully-qualified type of a return value.
protected  java.lang.String name
          The name of a called method.
protected  java.lang.String ref
          The class name of the element of a called method.
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxExpression
sort
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxDefUseExpression
defs, expressions, uses
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxElement
element
 
Constructor Summary
protected JxMethodCall()
          Creates a new, empty object.
protected JxMethodCall(org.w3c.dom.Element elem)
          Creates a new object wrapping a Expr element with the sort="MethodCall" or sort="CtorCall"attribute.
  JxMethodCall(org.w3c.dom.Element elem, org.w3c.dom.Element decl)
          Creates a new object wrapping a Expr element with the sort="MethodCall" or sort="CtorCall" attribute.
 
Method Summary
 boolean equals(JxMethodCall jcall)
          Tests if a given method call wrapper equals to this one.
 org.w3c.dom.Element[] getArgumentElements()
          Obtains the elements of all argument expressions contained in this method call.
 java.lang.String getArgumentTypeFqn(int index)
          Obtains the fully-qualified name of the argument type at the specified position.
 java.lang.String getBindingSignature()
          Returns the binding string of this method call.
 org.w3c.dom.Element getDeclaration()
          Returns the declaration element for the called method.
 java.lang.String getDefId()
          Returns the identifier of the called method (not the identifier of the method call).
 java.lang.String getName()
          Returns the name of the called method.
 int getNumOfArguments()
          Returns the number of arguments of this method call.
 JxMethod getReferencedJxMethod()
          Returns the method wrapper referenced by this method call.
 java.lang.String getTypeFqn()
          Returns the fully qualified name of a return type of this method.
 boolean isConstructorCall()
          Tests if this element indicates a constructor call.
static boolean isMethodCall(org.w3c.dom.Element elem)
          Tests if a given element equals to Expr with sort="MethodCall".
 boolean isNormalCall()
          Tests if this element indicates a normal method call.
 boolean isSuperConsutructorCall()
          Tests if this element indicates a super constructor call.
 boolean isThisConsutructorCall()
          Tests if this element indicates a this constructor call.
 void print()
          Displays information about this method call wrapper for debugging.
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxExpression
equals, getCastedTypeFqn, getCastedTypeName, getDotPrefix, getJavaStatement, getSort, isArrayCreation, isAssign, isDotOperator, isExpression, isFieldAccess, isInSimpleAssignment, isInstanceCreation, isMethodCall, isOpAssign, isParenthesis, isPostAssignment, isPostDecrement, isPostIncrement, isPreAssignment, isPreDecrement, isPreIncement, isSuperConstructorCall, isSuperReference, isThisConstructorCall, isThisReference, isVariableAccess
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxDefUseExpression
addDefinedVariable, addDefinedVariableFirst, addUsedVariable, addUsedVariableFirst, clearDefinedVariable, clearUsedVariable, definesVariable, getDefinedVariables, getExpressions, getUsedVariables, removeDefinedVariable, removeUsedVariable, usesVariable
 
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, getJxClass, getJxField, getJxFile, getJxMethod, 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
 

Field Detail

name

protected java.lang.String name
The name of a called method.


fqn

protected java.lang.String fqn
The fully-qualified type of a return value.


defid

protected java.lang.String defid
The identifier string of the element of a called method.


binding

protected java.lang.String binding
The binding information about this method call.


declaration

protected org.w3c.dom.Element declaration
The element of the element of a called method.


ref

protected java.lang.String ref
The class name of the element of a called method.


arguments

protected org.w3c.dom.Element[] arguments
The elements of arguments of this method call.

Constructor Detail

JxMethodCall

protected JxMethodCall()
Creates a new, empty object.


JxMethodCall

protected JxMethodCall(org.w3c.dom.Element elem)
                throws JxWrapperException
Creates a new object wrapping a Expr element with the sort="MethodCall" or sort="CtorCall"attribute.

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

JxMethodCall

public JxMethodCall(org.w3c.dom.Element elem,
                    org.w3c.dom.Element decl)
             throws JxWrapperException
Creates a new object wrapping a Expr element with the sort="MethodCall" or sort="CtorCall" attribute.

Parameters:
elem - An DOM element to be wrapped.
decl - The declaration's element referenced by this method call.
Throws:
JxWrapperException - if the specified element is not valid.
Method Detail

getName

public java.lang.String getName()
Returns the name of the called method.

Overrides:
getName in class JxExpression
Returns:
The name string of the called method.

getTypeFqn

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

Overrides:
getTypeFqn in class JxExpression
Returns:
The fully-qualified name string.

getDefId

public java.lang.String getDefId()
Returns the identifier of the called method (not the identifier of the method call).

Returns:
The identifier of the called method.

getBindingSignature

public java.lang.String getBindingSignature()
Returns the binding string of this method call.

Returns:
The signature string of the called method.

getDeclaration

public org.w3c.dom.Element getDeclaration()
Returns the declaration element for the called method.

Returns:
The declaration element Method.

getReferencedJxMethod

public JxMethod getReferencedJxMethod()
                               throws JxWrapperException
Returns the method wrapper referenced by this method call.

Returns:
The wrapper of the referenced method.
Throws:
JxWrapperException

isMethodCall

public static boolean isMethodCall(org.w3c.dom.Element elem)
Tests if a given element equals to Expr with sort="MethodCall".

Parameters:
elem - An element of the DOM.
Returns:
true if the element equals to method call, otherwise false.

isNormalCall

public boolean isNormalCall()
Tests if this element indicates a normal method call.

Returns:
true if this element indicates a normal method call.

isConstructorCall

public boolean isConstructorCall()
Tests if this element indicates a constructor call.

Overrides:
isConstructorCall in class JxExpression
Returns:
true if this element indicates a constructor call.

isThisConsutructorCall

public boolean isThisConsutructorCall()
Tests if this element indicates a this constructor call.

Returns:
true if this element indicates a this call.

isSuperConsutructorCall

public boolean isSuperConsutructorCall()
Tests if this element indicates a super constructor call.

Returns:
true if this element indicates a super call.

getArgumentElements

public org.w3c.dom.Element[] getArgumentElements()
Obtains the elements of all argument expressions contained in this method call.

Returns:
The array of the Expr elements.

getNumOfArguments

public int getNumOfArguments()
Returns the number of arguments of this method call.

Returns:
The number of arguments.

getArgumentTypeFqn

public java.lang.String getArgumentTypeFqn(int index)
Obtains the fully-qualified name of the argument type at the specified position.

Parameters:
index - The position of the specified argument.
Returns:
The fully-qualified name string of the type of the specified argument, or null.

equals

public boolean equals(JxMethodCall jcall)
Tests if a given method call wrapper equals to this one.

Parameters:
jcall - A method call wrapper.
Returns:
true if the method call wrapper equals to this one, otherwise false.

print

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

Overrides:
print in class JxExpression