com.jxml.quick.util.qjml2java
Class Element

java.lang.Object
  |
  +--com.jxml.quick.util.qjml2java.Element

public class Element
extends Object

This class represents a Java class. It is called Element because it's usually created from an XML element definition, but it can also be created from an attribute definition.


Field Summary
 boolean abst
           
 ElList attributes
           
 boolean bimodal
           
 boolean clonable
           
 ArrayList comments
           
 ArrayList fields
           
static String fileExt
           
 boolean generate
           
 boolean hasAClass
           
 ArrayList imp
           
 boolean intf
           
 boolean newClass
           
 Element parentElement
           
static boolean printClone
           
static boolean printFullConst
           
static boolean printMoreMethods
           
static boolean printPrint
           
static boolean printQAware
           
static boolean printXPath
           
 ElList selseq
           
static boolean setParents
           
 ArrayList subclasses
           
 String tagName
           
 String targetClass
           
 boolean textConstructor
           
 ArrayList values
           
 boolean wild
           
 
Constructor Summary
Element()
           
 
Method Summary
 boolean fieldExists(String fieldName)
           
 void getAllClasses(ArrayList allElements, ArrayList discarded)
           
static String getClassName(String accessclass)
           
 ClassField getField(int i)
           
 void getPackages(Vector allPackages)
           
 void init()
           
static boolean isJavaType(String accessclass)
           
static boolean isKnownPackage(String name, Vector allPackages)
           
 void makeAllFiles(String folderPath)
           
 void makeFields()
           
 void makeFile(String folderPath, String basePackagePath)
           
 void makeQGBase(String folderPath, String packagepath)
           
 void makeQGBaseIntf(String folderPath, String packagepath)
           
 PrintWriter openFile(String filename)
           
 void printClassMethods(PrintWriter pw)
           
 void printClassStart(PrintWriter pw, String classname, String extClass, boolean quick_class)
           
 void printCloneMethod(PrintWriter pw)
           
 void printConstructors(PrintWriter pw, String classname, boolean quick_class)
           
 void printFieldDeclarations(PrintWriter pw)
           
 void printImports(PrintWriter pw, String importToAdd)
           
 void printXMethods(PrintWriter pw)
           
 ArrayList subXChildren()
          for abstract classes or interfaces, return the list of subclasses that are not abstract.
static String transformTargetClass(String tc)
           
static String typeToJava(String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

printClone

public static boolean printClone

printQAware

public static boolean printQAware

setParents

public static boolean setParents

printPrint

public static boolean printPrint

printXPath

public static boolean printXPath

printFullConst

public static boolean printFullConst

printMoreMethods

public static boolean printMoreMethods

fileExt

public static String fileExt

targetClass

public String targetClass

tagName

public String tagName

selseq

public ElList selseq

attributes

public ElList attributes

textConstructor

public boolean textConstructor

newClass

public boolean newClass

hasAClass

public boolean hasAClass

clonable

public boolean clonable

values

public ArrayList values

comments

public ArrayList comments

wild

public boolean wild

bimodal

public boolean bimodal

parentElement

public Element parentElement

abst

public boolean abst

subclasses

public ArrayList subclasses

intf

public boolean intf

imp

public ArrayList imp

generate

public boolean generate

fields

public ArrayList fields
Constructor Detail

Element

public Element()
Method Detail

init

public void init()

getAllClasses

public void getAllClasses(ArrayList allElements,
                          ArrayList discarded)

makeAllFiles

public void makeAllFiles(String folderPath)

openFile

public PrintWriter openFile(String filename)

makeQGBaseIntf

public void makeQGBaseIntf(String folderPath,
                           String packagepath)

makeQGBase

public void makeQGBase(String folderPath,
                       String packagepath)

printClassStart

public void printClassStart(PrintWriter pw,
                            String classname,
                            String extClass,
                            boolean quick_class)

makeFile

public void makeFile(String folderPath,
                     String basePackagePath)

isKnownPackage

public static boolean isKnownPackage(String name,
                                     Vector allPackages)

getPackages

public void getPackages(Vector allPackages)

printImports

public void printImports(PrintWriter pw,
                         String importToAdd)

makeFields

public void makeFields()

printFieldDeclarations

public void printFieldDeclarations(PrintWriter pw)

printConstructors

public void printConstructors(PrintWriter pw,
                              String classname,
                              boolean quick_class)

printClassMethods

public void printClassMethods(PrintWriter pw)

printCloneMethod

public void printCloneMethod(PrintWriter pw)

printXMethods

public void printXMethods(PrintWriter pw)

getField

public ClassField getField(int i)

fieldExists

public boolean fieldExists(String fieldName)

subXChildren

public ArrayList subXChildren()
for abstract classes or interfaces, return the list of subclasses that are not abstract. Otherwise return this. The goal is to get the classes linked to XML elements (for the xPath method).

typeToJava

public static String typeToJava(String type)

getClassName

public static String getClassName(String accessclass)

isJavaType

public static boolean isJavaType(String accessclass)

transformTargetClass

public static String transformTargetClass(String tc)