org.jtool.jxplatform.wrapper
Class JxStaticInit

java.lang.Object
  extended byorg.jtool.jxplatform.wrapper.JxElement
      extended byorg.jtool.jxplatform.wrapper.JxStaticInit

public class JxStaticInit
extends JxElement

An object wrapping the SInit element.

Author:
Katsuhisa Maruyama

Field Summary
protected  org.w3c.dom.Element[] faccessElems
          Elements of field accesses within in this method.
protected  org.w3c.dom.Element[] innerclassElems
          Elements of inner classes within in this method.
protected  org.w3c.dom.Element[] localElems
          Elements of local variables defined in this method.
protected  org.w3c.dom.Element[] mcallElems
          Elements of method calls within in this method.
protected  org.w3c.dom.Element[] vaccessElems
          Elements of variable accesses within in this method.
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxElement
element
 
Constructor Summary
protected JxStaticInit()
          Creates a new, empty object.
protected JxStaticInit(org.w3c.dom.Element elem)
          Creates a new object wrapping a SInit element.
 
Method Summary
 boolean enclose(org.w3c.dom.Element elem)
          Tests if this static initializer element encloses a given element.
 boolean equals(JxStaticInit jstatic)
          Tests if a given static initializer wrapper equals to this one.
 org.w3c.dom.Element[] getAllFieldAccessElements()
          Returns elements of field accesses contained in this method.
 org.w3c.dom.Element[] getAllInnerClassElements()
          Returns the elements of inner classes contained in this method.
 org.w3c.dom.Element[] getAllLocalElements()
          Returns the elements of all local variable declarations contained in this static initializer.
 org.w3c.dom.Element[] getAllMethodCallElements()
          Returns the elements of method calls contained in this static initializer.
 org.w3c.dom.Element[] getAllVariableAccessElements()
          Returns the elements of variable accesses contained in this static inotializer.
 JxVariableList getDefinedJxVariables()
          Returns variable accesses the value of which is defined in this method.
 JxVariableList getJxVariables()
          Returns variable appearing in this method.
static org.w3c.dom.Element getStaticInitElement(org.w3c.dom.Element elem)
          Returns the SInit element containing a given element.
 JxVariableList getUsedJxVariables()
          Returns variable accesses the value of which is used in this method.
 boolean isStatic()
          Test if this static initializer is static.
static boolean isStaticInit(org.w3c.dom.Element elem)
          Tests if a given element equals to SInit.
 void print()
          Displays information about this static initializer wrapper for debugging.
 
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

localElems

protected org.w3c.dom.Element[] localElems
Elements of local variables defined in this method.


mcallElems

protected org.w3c.dom.Element[] mcallElems
Elements of method calls within in this method.


faccessElems

protected org.w3c.dom.Element[] faccessElems
Elements of field accesses within in this method.


vaccessElems

protected org.w3c.dom.Element[] vaccessElems
Elements of variable accesses within in this method.


innerclassElems

protected org.w3c.dom.Element[] innerclassElems
Elements of inner classes within in this method.

Constructor Detail

JxStaticInit

protected JxStaticInit()
Creates a new, empty object.


JxStaticInit

protected JxStaticInit(org.w3c.dom.Element elem)
                throws JxWrapperException
Creates a new object wrapping a SInit element.

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

isStaticInit

public static boolean isStaticInit(org.w3c.dom.Element elem)
Tests if a given element equals to SInit.

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

getStaticInitElement

public static org.w3c.dom.Element getStaticInitElement(org.w3c.dom.Element elem)
Returns the SInit element containing a given element.

Parameters:
elem - An element of the DOM.
Returns:
The SInit element, or null if thereis no such element.

equals

public boolean equals(JxStaticInit jstatic)
Tests if a given static initializer wrapper equals to this one.

Parameters:
jstatic - A static initializer wrapper.
Returns:
true if the static initializer wrapper equals to this one, otherwise false.

enclose

public boolean enclose(org.w3c.dom.Element elem)
Tests if this static initializer element encloses a given element.

Parameters:
elem - An element of the DOM.
Returns:
true if this element encloses the element.

isStatic

public boolean isStatic()
Test if this static initializer is static.

Returns:
true if this static initializer is static.

getAllLocalElements

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

Returns:
The array of the Local elements.

getAllMethodCallElements

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

Returns:
The elements of method calls.

getAllFieldAccessElements

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

Returns:
The elememts of field accesses.

getAllVariableAccessElements

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

Returns:
The elememts of variable accesses.

getDefinedJxVariables

public JxVariableList getDefinedJxVariables()
                                     throws JxWrapperException
Returns variable accesses the value of which is defined in this method.

Returns:
A collection of JxVariable.
Throws:
JxWrapperException - if the creation of a variable access wrapper fails.

getUsedJxVariables

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

Returns:
A collection of JxVariable.
Throws:
JxWrapperException - if the creation of a variable access wrapper fails.

getJxVariables

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

Returns:
A collection of JxVariable.
Throws:
JxWrapperException - if the creation of a wrapper fails.

getAllInnerClassElements

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

Returns:
The elememts of inner classes.

print

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