org.jacorb.idl

Class IdlSymbol

Known Direct 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.36 2004/05/06 12:39:58 nicolas Exp $

Author:
Gerald Brose

Field Summary

protected String
_id
protected IdlSymbol
enclosing_symbol
protected static char
fileSeparator
protected boolean
included
protected boolean
inhibitionFlag
protected boolean
is_pseudo
protected String
omg_package_prefix
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(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(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(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(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.
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)
IdlSymbol
getEnclosingSymbol()
str_token
get_token()
String
id()
boolean
isEscaped()
boolean
is_included()
is this a symbol included from another IDL file?
boolean
is_pseudo()
is this a PIDL symbol?
String
name()
get this symbol's name
static int
new_num()
String
omgPrefix()
void
parse()
empty parse
void
print(PrintWriter ps)
void
printIdMethod(PrintWriter ps)
void
printImport(PrintWriter ps)
void
setEnclosingSymbol(IdlSymbol s)
void
setPackage(String s)
void
setPrintPhaseNames()
void
set_name(String n)
the name of this symbol
void
set_pseudo()
void
set_token(str_token i)

Field Details

_id

protected String _id


enclosing_symbol

protected IdlSymbol enclosing_symbol


fileSeparator

protected static final char fileSeparator


included

protected boolean included


inhibitionFlag

protected boolean inhibitionFlag


is_pseudo

protected boolean is_pseudo


omg_package_prefix

protected String omg_package_prefix


pack_name

public String pack_name

Constructor Details

IdlSymbol

public IdlSymbol(int num)
class constructor

Method Details

accept

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


addImportedAlias

public void addImportedAlias(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(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(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(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 -


deEscapeName

public String deEscapeName()


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.


generateIncluded

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


getEnclosingSymbol

public IdlSymbol getEnclosingSymbol()


get_token

public str_token get_token()


id

public String id()

Returns:
this symbol's repository Id


isEscaped

public boolean isEscaped()


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.


is_pseudo

public boolean is_pseudo()
is this a PIDL symbol?


name

public String name()
get this symbol's name


new_num

public static int new_num()


omgPrefix

public 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


print

public void print(PrintWriter ps)


printIdMethod

public void printIdMethod(PrintWriter ps)


printImport

public void printImport(PrintWriter ps)


setEnclosingSymbol

public void setEnclosingSymbol(IdlSymbol s)


setPackage

public void setPackage(String s)


setPrintPhaseNames

public void setPrintPhaseNames()


set_name

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


set_pseudo

public void set_pseudo()


set_token

public void set_token(str_token i)