org.openorb.rmi.compiler.parser
Class JavaParser

java.lang.Object
  |
  +--org.openorb.rmi.compiler.parser.JavaParser

public class JavaParser
extends java.lang.Object

This class builds the java data tree needed for the generation of idl code.

Author:
Jerome Daniel

Constructor Summary
JavaParser()
           
JavaParser(boolean root)
           
 
Method Summary
 org.openorb.compiler.object.IdlObject add_idl_file(java.util.Vector include, org.openorb.CORBA.kernel.Configurator configurator, java.lang.String idl_file_name)
          Add idl included files
 void add_idl_files(java.util.Vector vect, java.util.Vector include, java.util.Vector symbole)
          Add idl included files
 void create_idl_tree()
          Create the IDL tree
static boolean doGenerateValueMethods()
           
static java.util.Vector getAlreadyProcessedClasses()
           
static java.util.Vector getCompilationTree()
           
 java.lang.Class getCurrentClass()
          Reading Accessor for the current parsed class
 org.openorb.compiler.object.IdlObject getIdlTreeRoot()
          Reading Accessor for the current parsed class
static java.util.Hashtable getMappingNames()
           
 void init()
           
static java.lang.Class load_class(java.lang.String filename)
          Allow to load a class
 void load_standard_idl(org.openorb.CORBA.kernel.Configurator configurator, java.util.Vector include)
          Add idl included files
 void parse_class(java.lang.Class c)
          Parse the class
 void parse_classes(java.lang.Class[] classes)
          Parse the classes
 org.openorb.compiler.object.IdlObject parse_java(java.lang.String java_file_name)
          This is the main method called to parse the java class file
 org.openorb.compiler.object.IdlObject parse_java(java.lang.String java_file_name, boolean check_implements)
          This is the main method called to parse the java class file
 org.openorb.compiler.object.IdlObject returnObject(java.lang.String scope, boolean limit)
          Look for a definition in all the compilation trees
 void setCurrentClass(java.lang.Class newClass)
          Writing Accessor for the new class to be parsed
static void setGenerateValueMethods(boolean value)
           
 void setIdlTreeRoot(org.openorb.compiler.object.IdlObject new_idl_root)
          Writing Accessor for the current parsed class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaParser

public JavaParser()

JavaParser

public JavaParser(boolean root)
Method Detail

getCompilationTree

public static java.util.Vector getCompilationTree()

getAlreadyProcessedClasses

public static java.util.Vector getAlreadyProcessedClasses()

getMappingNames

public static java.util.Hashtable getMappingNames()

doGenerateValueMethods

public static boolean doGenerateValueMethods()

setGenerateValueMethods

public static void setGenerateValueMethods(boolean value)

setCurrentClass

public void setCurrentClass(java.lang.Class newClass)
Writing Accessor for the new class to be parsed

getCurrentClass

public java.lang.Class getCurrentClass()
Reading Accessor for the current parsed class

getIdlTreeRoot

public org.openorb.compiler.object.IdlObject getIdlTreeRoot()
Reading Accessor for the current parsed class

returnObject

public org.openorb.compiler.object.IdlObject returnObject(java.lang.String scope,
                                                          boolean limit)
Look for a definition in all the compilation trees

setIdlTreeRoot

public void setIdlTreeRoot(org.openorb.compiler.object.IdlObject new_idl_root)
Writing Accessor for the current parsed class

init

public void init()

parse_java

public org.openorb.compiler.object.IdlObject parse_java(java.lang.String java_file_name)
This is the main method called to parse the java class file
Parameters:
java_file_name - The name of the file to parse

parse_java

public org.openorb.compiler.object.IdlObject parse_java(java.lang.String java_file_name,
                                                        boolean check_implements)
This is the main method called to parse the java class file
Parameters:
java_file_name - The name of the file to parse
check_implements - Check whether the class is an implementation class and try to get the remote interface in this case.

load_class

public static java.lang.Class load_class(java.lang.String filename)
                                  throws java.lang.ClassNotFoundException
Allow to load a class
Parameters:
filename - The name of the class file to load and parse
Returns:
The loaded class
Throws:
java.lang.ClassNotFoundException - If no class was found

parse_classes

public void parse_classes(java.lang.Class[] classes)
Parse the classes
Parameters:
classes - The classes to parse

parse_class

public void parse_class(java.lang.Class c)
Parse the class
Parameters:
c - The class to parse

create_idl_tree

public void create_idl_tree()
Create the IDL tree

load_standard_idl

public void load_standard_idl(org.openorb.CORBA.kernel.Configurator configurator,
                              java.util.Vector include)
Add idl included files

add_idl_files

public void add_idl_files(java.util.Vector vect,
                          java.util.Vector include,
                          java.util.Vector symbole)
Add idl included files

add_idl_file

public org.openorb.compiler.object.IdlObject add_idl_file(java.util.Vector include,
                                                          org.openorb.CORBA.kernel.Configurator configurator,
                                                          java.lang.String idl_file_name)
Add idl included files