org.jacorb.idl
Class IdlSymbol

java.lang.Object
  extended byorg.jacorb.idl.runtime.symbol
      extended byorg.jacorb.idl.IdlSymbol
Direct Known Subclasses:
Declaration, Declarator, Definition, InterfaceBody, ParamDecl, Spec, SymbolList, TypeSpec

public class IdlSymbol
extends symbol

Base class for all classes of the abstract IDL syntax tree

Version:
$Id: IdlSymbol.java,v 1.35 2004/01/30 13:40:31 gerald Exp $
Author:
Gerald Brose

Field Summary
protected  java.lang.String _id
           
protected  IdlSymbol enclosing_symbol
           
protected static char fileSeparator
           
protected  boolean included
           
protected  boolean inhibitionFlag
           
protected  boolean is_pseudo
           
protected  java.lang.String omg_package_prefix
           
 java.lang.String pack_name
           
 
Fields inherited from class org.jacorb.idl.runtime.symbol
parse_state, sym
 
Constructor Summary
IdlSymbol(int num)
          class constructor
 
Method Summary
 void accept(IDLTreeVisitor visitor)
          let the visitor pattern do its work...
 void addImportedAlias(java.lang.String alias)
          Called by derived classes to potentially add the aliasHelper name to the generated Java class's import list, which is necessary in case the mapped code is in the unnamed package.
 void addImportedName(java.lang.String name)
          Called by derived classes to potentially add the name and the nameHelper to the generated Java class's import list, which is necessary in case the mapped code is in the unnamed package.
 void addImportedName(java.lang.String name, TypeSpec type)
          Called by derived classes to potentially add the name and the nameHelper to the generated Java class's import list, which is necessary in case the mapped code is in the unnamed package.
 void addImportedNameHolder(java.lang.String name)
          Called by derived classes to potentially add the name, the nameHelper and nameHolder to the generated Java class's import list, which is necessary in case the mapped code is in the unnamed package.
 java.lang.String deEscapeName()
           
 void escapeName()
          A number of IDL constructs need to have their names checked for clashes with name reserved by Java or the Java Language Mapping.
protected  boolean generateIncluded()
          access to parser state (e.g. options)
 str_token get_token()
           
 IdlSymbol getEnclosingSymbol()
           
 java.lang.String id()
           
 boolean is_included()
          is this a symbol included from another IDL file?
 boolean is_pseudo()
          is this a PIDL symbol?
 boolean isEscaped()
           
 java.lang.String name()
          get this symbol's name
static int new_num()
           
 java.lang.String omgPrefix()
           
 void parse()
          empty parse
 void print(java.io.PrintWriter ps)
           
 void printIdMethod(java.io.PrintWriter ps)
           
 void printImport(java.io.PrintWriter ps)
           
 void set_name(java.lang.String n)
          the name of this symbol
 void set_pseudo()
           
 void set_token(str_token i)
           
 void setEnclosingSymbol(IdlSymbol s)
           
 void setPackage(java.lang.String s)
           
 void setPrintPhaseNames()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pack_name

public java.lang.String pack_name

is_pseudo

protected boolean is_pseudo

included

protected boolean included

inhibitionFlag

protected boolean inhibitionFlag

_id

protected java.lang.String _id

enclosing_symbol

protected IdlSymbol enclosing_symbol

omg_package_prefix

protected java.lang.String omg_package_prefix

fileSeparator

protected static final char fileSeparator
Constructor Detail

IdlSymbol

public IdlSymbol(int num)
class constructor

Method Detail

is_included

public boolean is_included()
is this a symbol included from another IDL file? Used to determine if code should be generated or not.


set_pseudo

public void set_pseudo()

is_pseudo

public boolean is_pseudo()
is this a PIDL symbol?


set_token

public void set_token(str_token i)

get_token

public str_token get_token()

name

public java.lang.String name()
get this symbol's name


escapeName

public void escapeName()
A number of IDL constructs need to have their names checked for clashes with name reserved by Java or the Java Language Mapping.


isEscaped

public boolean isEscaped()

deEscapeName

public java.lang.String deEscapeName()

setPackage

public void setPackage(java.lang.String s)

setEnclosingSymbol

public void setEnclosingSymbol(IdlSymbol s)

getEnclosingSymbol

public IdlSymbol getEnclosingSymbol()

new_num

public static int new_num()

set_name

public void set_name(java.lang.String n)
the name of this symbol


omgPrefix

public java.lang.String omgPrefix()
Returns:
"org.omg." if the symbol has been declared inside a scope with a pragma prefix of "omg.org".

parse

public void parse()
           throws ParseException
empty parse

Throws:
ParseException

print

public void print(java.io.PrintWriter ps)

printImport

public void printImport(java.io.PrintWriter ps)

addImportedAlias

public void addImportedAlias(java.lang.String alias)
Called by derived classes to potentially add the aliasHelper name to the generated Java class's import list, which is necessary in case the mapped code is in the unnamed package.

Parameters:
alias - the name of the alias

addImportedName

public void addImportedName(java.lang.String name)
Called by derived classes to potentially add the name and the nameHelper to the generated Java class's import list, which is necessary in case the mapped code is in the unnamed package.

Parameters:
name -

addImportedName

public void addImportedName(java.lang.String name,
                            TypeSpec type)
Called by derived classes to potentially add the name and the nameHelper to the generated Java class's import list, which is necessary in case the mapped code is in the unnamed package.

Parameters:
name -
type -

addImportedNameHolder

public void addImportedNameHolder(java.lang.String name)
Called by derived classes to potentially add the name, the nameHelper and nameHolder to the generated Java class's import list, which is necessary in case the mapped code is in the unnamed package.

Parameters:
name -

setPrintPhaseNames

public void setPrintPhaseNames()

printIdMethod

public void printIdMethod(java.io.PrintWriter ps)

id

public java.lang.String id()
Returns:
this symbol's repository Id

generateIncluded

protected boolean generateIncluded()
access to parser state (e.g. options)


accept

public void accept(IDLTreeVisitor visitor)
let the visitor pattern do its work...