org.jacorb.idl

Class ScopedName

Implemented Interfaces:
org.jacorb.idl.SwitchTypeSpec

public class ScopedName
extends org.jacorb.idl.SimpleTypeSpec
implements org.jacorb.idl.SwitchTypeSpec

IDL scoped names

Version:
$Id: ScopedName.java,v 1.32 2004/05/06 12:39:58 nicolas Exp $

Author:
Gerald Brose

Field Summary

String
typeName

Fields inherited from class org.jacorb.idl.TypeSpec

alias, type_spec

Fields inherited from class org.jacorb.idl.IdlSymbol

_id, enclosing_symbol, fileSeparator, included, inhibitionFlag, is_pseudo, omg_package_prefix, pack_name

Fields inherited from class org.jacorb.idl.runtime.symbol

parse_state, sym

Constructor Summary

ScopedName(int num)
class constructor

Method Summary

String
IDLName()
static void
addRecursionScope(String typeName)
boolean
basic()
Object
clone()
static void
definePseudoScope(String name)
Interfaces define a new scope, but since we can't do that in Java, this kind of scope is called a 'pseudo scope' and is just prepended to the interface name
static void
enumMap(String n, String m)
enumerations don't define new scopes in IDL, but their mapping to Java introduces a new scope by generating a new class for the enum's type.
void
escapeName()
String
getTypeCodeExpression()
String
holderName()
String
id()
static boolean
isPseudoScope(String name)
static boolean
isRecursionScope(String typeName)
boolean
isSwitchable()
boolean
is_pseudo()
is this a PIDL symbol?
void
parse()
empty parse
void
print(PrintWriter ps)
String
printExtractExpression()
String
printInsertExpression()
String
printReadExpression(String streamname)
String
printWriteStatement(String var_name, String streamname)
static void
removeRecursionScope(String typeName)
boolean
resolved()
String
resolvedName()
TypeSpec
resolvedTypeSpec()
void
setEnclosingSymbol(IdlSymbol s)
void
setId(String _id)
void
setPackage(String s)
String
toString()
String
typeName()
TypeSpec
typeSpec()
static String
unPseudoName(String name)
unPseudo transforms scoped names like module.Interface1.Interface2.Type_name to module.Interface1Package.Interface2Package.Type_name

Methods inherited from class org.jacorb.idl.TypeSpec

basic, clone, getIDLTypeName, getJavaTypeName, getTypeCodeExpression, getTypeCodeExpression, holderName, parse, print, printExtractExpression, printInsertExpression, printReadExpression, printReadStatement, printWriteStatement, setEnclosingSymbol, setPackage, set_constr, toString, typeName, typeSpec

Methods inherited from class org.jacorb.idl.IdlSymbol

accept, addImportedAlias, addImportedName, addImportedName, addImportedNameHolder, deEscapeName, escapeName, generateIncluded, getEnclosingSymbol, get_token, id, isEscaped, is_included, is_pseudo, name, new_num, omgPrefix, parse, print, printIdMethod, printImport, setEnclosingSymbol, setPackage, setPrintPhaseNames, set_name, set_pseudo, set_token

Field Details

typeName

public String typeName

Constructor Details

ScopedName

public ScopedName(int num)
class constructor

Method Details

IDLName

public String IDLName()


addRecursionScope

public static void addRecursionScope(String typeName)


basic

public boolean basic()
Overrides:
basic in interface TypeSpec


clone

public Object clone()
Overrides:
clone in interface TypeSpec


definePseudoScope

public static void definePseudoScope(String name)
Interfaces define a new scope, but since we can't do that in Java, this kind of scope is called a 'pseudo scope' and is just prepended to the interface name


enumMap

public static void enumMap(String n,
                           String m)
enumerations don't define new scopes in IDL, but their mapping to Java introduces a new scope by generating a new class for the enum's type. Thus, enumeration values have to be additionally scoped in Java.


escapeName

public void escapeName()
Overrides:
escapeName in interface IdlSymbol


getTypeCodeExpression

public String getTypeCodeExpression()
Overrides:
getTypeCodeExpression in interface TypeSpec

Returns:
a string for an expression of type TypeCode that describes this type


holderName

public String holderName()
Overrides:
holderName in interface TypeSpec


id

public String id()
Overrides:
id in interface IdlSymbol

Returns:
this symbol's repository Id


isPseudoScope

public static boolean isPseudoScope(String name)


isRecursionScope

public static boolean isRecursionScope(String typeName)


isSwitchable

public boolean isSwitchable()
Specified by:
isSwitchable in interface org.jacorb.idl.SwitchTypeSpec


is_pseudo

public boolean is_pseudo()
is this a PIDL symbol?
Overrides:
is_pseudo in interface IdlSymbol


parse

public void parse()
empty parse
Overrides:
parse in interface TypeSpec


print

public void print(PrintWriter ps)
Overrides:
print in interface TypeSpec


printExtractExpression

public String printExtractExpression()
Overrides:
printExtractExpression in interface TypeSpec


printInsertExpression

public String printInsertExpression()
Overrides:
printInsertExpression in interface TypeSpec


printReadExpression

public String printReadExpression(String streamname)
Overrides:
printReadExpression in interface TypeSpec


printWriteStatement

public String printWriteStatement(String var_name,
                                  String streamname)
Overrides:
printWriteStatement in interface TypeSpec


removeRecursionScope

public static void removeRecursionScope(String typeName)


resolved

public boolean resolved()


resolvedName

public String resolvedName()


resolvedTypeSpec

public TypeSpec resolvedTypeSpec()


setEnclosingSymbol

public void setEnclosingSymbol(IdlSymbol s)
Overrides:
setEnclosingSymbol in interface TypeSpec


setId

public void setId(String _id)


setPackage

public void setPackage(String s)
Overrides:
setPackage in interface TypeSpec


toString

public String toString()
Overrides:
toString in interface TypeSpec


typeName

public String typeName()
Overrides:
typeName in interface TypeSpec

Returns:
the fully qualified and resolved name in an intermediate format, i.e. with "Package" suffixes but without potential "omg.org" scopes


typeSpec

public TypeSpec typeSpec()
Overrides:
typeSpec in interface TypeSpec


unPseudoName

public static String unPseudoName(String name)
unPseudo transforms scoped names like module.Interface1.Interface2.Type_name to module.Interface1Package.Interface2Package.Type_name