org.jtool.jxplatform.wrapper
Class JxWrapperFactory

java.lang.Object
  extended byorg.jtool.jxplatform.wrapper.JxWrapperFactory

public class JxWrapperFactory
extends java.lang.Object

A utility class which provides quaries about projects. Do not pass null to any parameter in methods in this class.

Author:
katsuhisa Maruayma

Constructor Summary
JxWrapperFactory()
           
 
Method Summary
static JxClass createJxClass(org.w3c.dom.Element elem)
          Creates a new object wrapping a Class or Intf element.
static JxDefUseExpression createJxDefUseExpression(org.w3c.dom.Element elem)
          Creates a new object wrapping an element for an expressin with defined and/or used variables.
static JxExpression createJxExpression(org.w3c.dom.Element elem)
          Creates a new object wrapping a Expr element.
static JxField createJxField(org.w3c.dom.Element elem)
          Creates a new object wrapping a Field element.
static JxFieldAccess createJxFieldAccess(org.w3c.dom.Element elem)
          Creates a new object wrapping a Expr element with the sort="FieldRef" attribute.
static JxFieldAccess createJxFieldAccess(org.w3c.dom.Element elem, org.w3c.dom.Element decl)
          Creates a new object wrapping a Expr element with the sort="FieldRef" attribute.
static JxFile createJxFile(org.w3c.dom.Element elem)
          Creates a new object wrapping a File element.
static JxImport createJxImport(org.w3c.dom.Element elem)
          Creates a new object wrapping a Import element.
static JxLocal createJxLocal(org.w3c.dom.Element elem)
          Creates a new object wrapping a Local element.
static JxMethod createJxMethod(org.w3c.dom.Element elem)
          Creates a new object wrapping a Method or Ctor element.
static JxMethodCall createJxMethodCall(org.w3c.dom.Element elem)
          Creates a new object wrapping a Expr element with the sort="MethodCall" or sort="CtorCall"attribute.
static JxPackage createJxPackage(org.w3c.dom.Element elem)
          Creates a new object wrapping a Package element.
static JxParameter createJxParameter(org.w3c.dom.Element elem)
          Creates a new object wrapping a Param element.
static JxStatement createJxStatement(org.w3c.dom.Element elem)
          Creates a new object wrapping a Stmt element.
static JxStaticInit createJxStaticInit(org.w3c.dom.Element elem)
          Creates a new object wrapping a SInit element.
static JxType createJxType(org.w3c.dom.Element elem)
          Creates a new object wrapping a Type element.
static JxVariable createJxVariable(org.w3c.dom.Element elem)
          Creates a new object wrapping a Expr element with the sort="VarRef" or sort="FieldRef" attribute.
static JxVariable createJxVariable(org.w3c.dom.Element elem, org.w3c.dom.Element decl)
          Creates a new object wrapping a Expr element with the sort="VarRef" or sort="FieldRef" attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JxWrapperFactory

public JxWrapperFactory()
Method Detail

createJxFile

public static JxFile createJxFile(org.w3c.dom.Element elem)
                           throws JxWrapperException
Creates a new object wrapping a File element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a file or a binary class file.
Throws:
JxWrapperException - if the specified element is not valid.

createJxPackage

public static JxPackage createJxPackage(org.w3c.dom.Element elem)
                                 throws JxWrapperException
Creates a new object wrapping a Package element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a package.
Throws:
JxWrapperException - if the specified element is not valid.

createJxImport

public static JxImport createJxImport(org.w3c.dom.Element elem)
                               throws JxWrapperException
Creates a new object wrapping a Import element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for an import declaration.
Throws:
JxWrapperException - if the specified element is not valid.

createJxClass

public static JxClass createJxClass(org.w3c.dom.Element elem)
                             throws JxWrapperException
Creates a new object wrapping a Class or Intf element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a class or a class in a binary class file.
Throws:
JxWrapperException - if the specified element is not valid.

createJxField

public static JxField createJxField(org.w3c.dom.Element elem)
                             throws JxWrapperException
Creates a new object wrapping a Field element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a field or a field in a binary class file.
Throws:
JxWrapperException - if the specified element is not valid.

createJxMethod

public static JxMethod createJxMethod(org.w3c.dom.Element elem)
                               throws JxWrapperException
Creates a new object wrapping a Method or Ctor element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a method or a method in a binary class file.
Throws:
JxWrapperException - if the specified element is not valid.

createJxStaticInit

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

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a static initializer.
Throws:
JxWrapperException - if the specified element is not valid.

createJxType

public static JxType createJxType(org.w3c.dom.Element elem)
                           throws JxWrapperException
Creates a new object wrapping a Type element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a type.
Throws:
JxWrapperException - if the specified element is not valid.

createJxDefUseExpression

public static JxDefUseExpression createJxDefUseExpression(org.w3c.dom.Element elem)
                                                   throws JxWrapperException
Creates a new object wrapping an element for an expressin with defined and/or used variables.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for an expression.
Throws:
JxWrapperException - if the specified element is not valid.

createJxExpression

public static JxExpression createJxExpression(org.w3c.dom.Element elem)
                                       throws JxWrapperException
Creates a new object wrapping a Expr element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for an expression.
Throws:
JxWrapperException - if the specified element is not valid.

createJxStatement

public static JxStatement createJxStatement(org.w3c.dom.Element elem)
                                     throws JxWrapperException
Creates a new object wrapping a Stmt element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a statement.
Throws:
JxWrapperException - if the specified element is not valid.

createJxLocal

public static JxLocal createJxLocal(org.w3c.dom.Element elem)
                             throws JxWrapperException
Creates a new object wrapping a Local element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a local declaration.
Throws:
JxWrapperException - if the specified element is not valid.

createJxParameter

public static JxParameter createJxParameter(org.w3c.dom.Element elem)
                                     throws JxWrapperException
Creates a new object wrapping a Param element.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a parameter.
Throws:
JxWrapperException - if the specified element is not valid.

createJxFieldAccess

public static JxFieldAccess createJxFieldAccess(org.w3c.dom.Element elem,
                                                org.w3c.dom.Element decl)
                                         throws JxWrapperException
Creates a new object wrapping a Expr element with the sort="FieldRef" attribute.

Parameters:
elem - An DOM element to be wrapped.
decl - The declaration's element referenced by this field varaible.
Returns:
The created wrapper for a field access expression.
Throws:
JxWrapperException - if the specified element is not valid.

createJxFieldAccess

public static JxFieldAccess createJxFieldAccess(org.w3c.dom.Element elem)
                                         throws JxWrapperException
Creates a new object wrapping a Expr element with the sort="FieldRef" attribute.

Parameters:
elem - An DOM element to be wrapped.
Returns:
The created wrapper for a field access expression.
Throws:
JxWrapperException - if the specified element is not valid.

createJxMethodCall

public static JxMethodCall createJxMethodCall(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.
Returns:
The created wrapper for a method call expression.
Throws:
JxWrapperException - if the specified element is not valid.

createJxVariable

public static JxVariable createJxVariable(org.w3c.dom.Element elem,
                                          org.w3c.dom.Element decl)
                                   throws JxWrapperException
Creates a new object wrapping a Expr element with the sort="VarRef" or sort="FieldRef" attribute.

Parameters:
elem - A DOM element to be wrapped.
decl - The declaration's element referenced by this varaible. The kind of this variable is undecided if this parameter is null.
Returns:
The created wrapper for a variable.
Throws:
JxWrapperException - if the specified element is not valid.

createJxVariable

public static JxVariable createJxVariable(org.w3c.dom.Element elem)
                                   throws JxWrapperException
Creates a new object wrapping a Expr element with the sort="VarRef" or sort="FieldRef" attribute.

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