org.jacorb.idl

Class IdlSymbol

public class IdlSymbol extends symbol

Base class for all classes of the abstract IDL syntax tree

Version: $Id: IdlSymbol.java,v 1.45 2006/08/03 12:31:17 alphonse.bendt Exp $

Author: Gerald Brose

Field Summary
protected IdlSymbolenclosing_symbol
protected static charfileSeparator
protected booleanincluded
protected booleaninhibitionFlag
protected booleanis_pseudo
protected Stringomg_package_prefix
Stringpack_name
protected String_id
Constructor Summary
IdlSymbol(int num)
class constructor
Method Summary
voidaccept(IDLTreeVisitor visitor)
let the visitor pattern do its work...
voidaddImportedAlias(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.
voidaddImportedName(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.
voidaddImportedName(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.
voidaddImportedNameHolder(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.
StringdeEscapeName()
voidescapeName()
A number of IDL constructs need to have their names checked for clashes with name reserved by Java or the Java Language Mapping.
protected booleangenerateIncluded()
access to parser state (e.g. options)
IdlSymbolgetEnclosingSymbol()
protected StringgetFullName(String name)
this method will prepend the specified name with the omg prefix if necessary
str_tokenget_token()
Stringid()
booleanisEscaped()
booleanis_included()
is this a symbol included from another IDL file?
booleanis_pseudo()
is this a PIDL symbol?
Stringname()
get this symbol's name
static intnew_num()
StringomgPrefix()
voidparse()
empty parse
voidprint(PrintWriter ps)
protected voidprintClassComment(String type, String name, PrintWriter ps)
printClassComment is used by inherited classes to print the class comment.
voidprintIdMethod(PrintWriter ps)
voidprintImport(PrintWriter ps)
voidsetEnclosingSymbol(IdlSymbol s)
voidsetPackage(String s)
voidsetPrintPhaseNames()
voidset_name(String n)
the name of this symbol
voidset_pseudo()
voidset_token(str_token i)

Field Detail

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

_id

protected String _id

Constructor Detail

IdlSymbol

public IdlSymbol(int num)
class constructor

Method Detail

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()

getFullName

protected String getFullName(String name)
this method will prepend the specified name with the omg prefix if necessary

Returns: the full qualified java name

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()
empty parse

print

public void print(PrintWriter ps)

printClassComment

protected final void printClassComment(String type, String name, PrintWriter ps)
printClassComment is used by inherited classes to print the class comment.

Parameters: name a String value ps a PrintWriter value

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)