org.jtool.jxplatform.wrapper
Class JxBinaryField

java.lang.Object
  extended byorg.jtool.jxplatform.wrapper.JxElement
      extended byorg.jtool.jxplatform.wrapper.JxDefUseExpression
          extended byorg.jtool.jxplatform.wrapper.JxField
              extended byorg.jtool.jxplatform.wrapper.JxBinaryField

public class JxBinaryField
extends JxField

An object wrapping a Field element of an XML document generated from a binary file.

Author:
Katsuhisa Maruyama

Field Summary
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxField
fqn, jvariable, mcallElems, name, type, vaccessElems
 
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 JxBinaryField()
          Creates a new, empty object.
protected JxBinaryField(org.w3c.dom.Element elem)
          Creates a new object wrapping a Field element.
 
Method Summary
 void addDefinedVariable(JxVariable jv)
          Adds a variable into a variable list of defined variables in this expression.
 void addDefinedVariableFirst(JxVariable jv)
          Adds a variable into the head of a variable list of defined variables in this expression.
 void addUsedVariable(JxVariable jv)
          Adds a variable into a variable list of used variables in this expression.
 void addUsedVariableFirst(JxVariable jv)
          Adds a variable into the head of a variable list of used variables in this expression.
 void clearDefinedVariable()
          Removes all variables in a variable list of defined variables in this expression.
 void clearUsedVariable()
          Removes all variables in a variable list of used variables in this expression.
 boolean definesVariable()
          Tests if this statement defines any variable.
 org.w3c.dom.Element[] getAllMethodCallElements()
          Returns the elements of method calls contained in this method.
 org.w3c.dom.Element[] getAllVariableAccessElements()
          Returns the elements of variable accesses contained in this static inotializer.
 JxField getDeclarativeField()
          Returns the field with its type among the fields sharing the same type-declaration.
 JxVariableList getDefinedVariables()
          Returns the list of variables defined in this statement.
 org.w3c.dom.Element[] getExpressions()
          Obtains the elements of expressions contained in this statement.
 JxClass getJxClass()
          Obtains a class wrapper defining this field.
 JxVariable getJxVariable()
          Returns the variable wrapper declared in this field.
 int getNumOfDeclaredFields()
          Returns the number of the fields sharing the same type-declaration.
 JxVariableList getUsedVariables()
          Returns the list of variables used in this statement.
 boolean hasInitialValue()
          Test if the value of the varibale in this field declaration is given.
 void print()
          Displays information about this field wrapper for debugging.
 void removeDefinedVariable(JxVariable jv)
          Removes a variable from a variable list of defined variables in this expression.
 void removeUsedVariable(JxVariable jv)
          Removes a variable from a variable list of used variables in this expression.
 boolean usesVariable()
          Tests if this statement uses any variable.
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxField
enclose, equals, getAccess, getFieldElement, getModifier, getName, getNameNode, getTypeFqn, getTypeName, isDefault, isField, isFinal, isOmitted, isPrivate, isProtected, isPublic, isStatic, isTransient, isVolatile
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxDefUseExpression
equals
 
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

JxBinaryField

protected JxBinaryField()
Creates a new, empty object.


JxBinaryField

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

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

getJxVariable

public JxVariable getJxVariable()
Returns the variable wrapper declared in this field.

Overrides:
getJxVariable in class JxField
Returns:
Always null since this method does not intend to be called.
See Also:
JxField.getJxVariable()

getJxClass

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

Overrides:
getJxClass in class JxField
Returns:
The JavaBinaryClass wrapper defining this field.
See Also:
JxField.getJxClass()

hasInitialValue

public boolean hasInitialValue()
Test if the value of the varibale in this field declaration is given.

Overrides:
hasInitialValue in class JxField
Returns:
Always false since this method does not intend to be called.
See Also:
JxField.hasInitialValue()

getAllMethodCallElements

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

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

getAllVariableAccessElements

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

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

getNumOfDeclaredFields

public int getNumOfDeclaredFields()
Returns the number of the fields sharing the same type-declaration.

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

getDeclarativeField

public JxField getDeclarativeField()
Returns the field with its type among the fields sharing the same type-declaration.

Overrides:
getDeclarativeField in class JxField
Returns:
The field with its declarative type.
See Also:
JxField.getDeclarativeField()

getExpressions

public org.w3c.dom.Element[] getExpressions()
Obtains the elements of expressions contained in this statement.

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

getDefinedVariables

public JxVariableList getDefinedVariables()
Returns the list of variables defined in this statement.

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

getUsedVariables

public JxVariableList getUsedVariables()
Returns the list of variables used in this statement.

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

definesVariable

public boolean definesVariable()
Tests if this statement defines any variable.

Overrides:
definesVariable in class JxDefUseExpression
Returns:
Always false since this method does not intend to be called.
See Also:
JxDefUseExpression.definesVariable()

usesVariable

public boolean usesVariable()
Tests if this statement uses any variable.

Overrides:
usesVariable in class JxDefUseExpression
Returns:
Always false since this method does not intend to be called.
See Also:
JxDefUseExpression.usesVariable()

addDefinedVariable

public void addDefinedVariable(JxVariable jv)
Adds a variable into a variable list of defined variables in this expression. Actually does nothing.

Overrides:
addDefinedVariable in class JxDefUseExpression
See Also:
JxDefUseExpression.addDefinedVariable(JxVariable)

addUsedVariable

public void addUsedVariable(JxVariable jv)
Adds a variable into a variable list of used variables in this expression. Actually does nothing.

Overrides:
addUsedVariable in class JxDefUseExpression
See Also:
JxDefUseExpression.addUsedVariable(JxVariable)

addDefinedVariableFirst

public void addDefinedVariableFirst(JxVariable jv)
Adds a variable into the head of a variable list of defined variables in this expression. Actually does nothing.

Overrides:
addDefinedVariableFirst in class JxDefUseExpression
See Also:
JxDefUseExpression.addDefinedVariableFirst(JxVariable)

addUsedVariableFirst

public void addUsedVariableFirst(JxVariable jv)
Adds a variable into the head of a variable list of used variables in this expression. Actually does nothing.

Overrides:
addUsedVariableFirst in class JxDefUseExpression
See Also:
JxDefUseExpression.addUsedVariableFirst(JxVariable)

removeDefinedVariable

public void removeDefinedVariable(JxVariable jv)
Removes a variable from a variable list of defined variables in this expression. Actually does nothing.

Overrides:
removeDefinedVariable in class JxDefUseExpression
See Also:
JxDefUseExpression.clearDefinedVariable()

removeUsedVariable

public void removeUsedVariable(JxVariable jv)
Removes a variable from a variable list of used variables in this expression. Actually does nothing.

Overrides:
removeUsedVariable in class JxDefUseExpression
See Also:
JxDefUseExpression.removeUsedVariable(JxVariable)

clearDefinedVariable

public void clearDefinedVariable()
Removes all variables in a variable list of defined variables in this expression. Actually does nothing.

Overrides:
clearDefinedVariable in class JxDefUseExpression
See Also:
JxDefUseExpression.clearDefinedVariable()

clearUsedVariable

public void clearUsedVariable()
Removes all variables in a variable list of used variables in this expression. Actually does nothing.

Overrides:
clearUsedVariable in class JxDefUseExpression
See Also:
JxDefUseExpression.clearUsedVariable()

print

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

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