org.jtool.jxplatform.j2x
Class Referencer

java.lang.Object
  extended byorg.jtool.jxplatform.j2x.Referencer

public class Referencer
extends java.lang.Object

Resolves reference information about files, methods, and fields.

Author:
Katsuhisa Maruyama

Constructor Summary
Referencer()
           
 
Method Summary
static org.w3c.dom.Element getClassElement(java.lang.String projectname, java.lang.String pathname, java.lang.String fqn)
          Returns a DOM element corresponding to a class with a fully-qualified name.
static org.w3c.dom.Element getReferencedClassElement(org.w3c.dom.Element elem, java.lang.String fqn)
          Returns the element for a referenced class with a fully-qualified name.
static org.w3c.dom.Element getReferencedElement(org.w3c.dom.Document doc, java.lang.String fqn)
          Returns a DOM element corresponding to a class (or binary class) to be retrieved.
static org.w3c.dom.Element getReferencedFieldElement(org.w3c.dom.Element elem, java.lang.String ref, java.lang.String defid, java.lang.String name)
          Returns the element for a referenced field with a name.
static org.w3c.dom.Element getReferencedMethodElement(org.w3c.dom.Element elem, java.lang.String ref, java.lang.String defid, java.lang.String sig)
          Returns the element for a referenced method or constructor having an id string or a signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Referencer

public Referencer()
Method Detail

getClassElement

public static org.w3c.dom.Element getClassElement(java.lang.String projectname,
                                                  java.lang.String pathname,
                                                  java.lang.String fqn)
Returns a DOM element corresponding to a class with a fully-qualified name.

Parameters:
projectname - The project name of a class to be retrieved.
pathname - The path name of a file containing a class to be retrieved.
fqn - The fully-qualified name of a class to be retrieved.
Returns:
The corresponding DOM element, or null if there is no element found.

getReferencedElement

public static org.w3c.dom.Element getReferencedElement(org.w3c.dom.Document doc,
                                                       java.lang.String fqn)
Returns a DOM element corresponding to a class (or binary class) to be retrieved.

Parameters:
doc - A DOM document object containing a referencing element.
fqn - The fully qualified name of a class to be retrieved.
Returns:
The corresponding DOM element, or null if there is no DOM document object found.

getReferencedClassElement

public static org.w3c.dom.Element getReferencedClassElement(org.w3c.dom.Element elem,
                                                            java.lang.String fqn)
Returns the element for a referenced class with a fully-qualified name.

Parameters:
elem - A DOM element referencing to a class to be retrieved.
fqn - The fully qualified name of a class to be retrieved.
Returns:
The element for the matched class element, or null if there is no element found.

getReferencedMethodElement

public static org.w3c.dom.Element getReferencedMethodElement(org.w3c.dom.Element elem,
                                                             java.lang.String ref,
                                                             java.lang.String defid,
                                                             java.lang.String sig)
Returns the element for a referenced method or constructor having an id string or a signature.

Parameters:
elem - A DOM element referencing to the method.
ref - The fully qualified name of a target class.
defid - The id string of a method to be retrieved.
sig - The signature of a method to be retrieved.
Returns:
The element for the matched method element, or null if there is no element found.

getReferencedFieldElement

public static org.w3c.dom.Element getReferencedFieldElement(org.w3c.dom.Element elem,
                                                            java.lang.String ref,
                                                            java.lang.String defid,
                                                            java.lang.String name)
Returns the element for a referenced field with a name.

Parameters:
elem - The element referencing to a field.
ref - The fully qualified name of a target class.
defid - The id string of a field to be retrieved.
name - The name of a field to be retrieved.
Returns:
The element for the matched field element, or null if there is no element found.