org.jacorb.idl
Class AliasTypeSpec

java.lang.Object
  extended byorg.jacorb.idl.runtime.symbol
      extended byorg.jacorb.idl.IdlSymbol
          extended byorg.jacorb.idl.TypeSpec
              extended byorg.jacorb.idl.AliasTypeSpec

public class AliasTypeSpec
extends TypeSpec

Version:
$Id: AliasTypeSpec.java,v 1.48 2005/10/03 21:13:22 andre.spiegel Exp $
Author:
Gerald Brose

Field Summary
 TypeSpec originalType
          the type for which this is an alias
 
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
AliasTypeSpec(TypeSpec ts)
          Class constructor,
 
Method Summary
 void accept(IDLTreeVisitor visitor)
          let the visitor pattern do its work...
 boolean basic()
           
 java.lang.String className()
           
 java.lang.Object clone()
           
 java.lang.String full_name()
           
 java.lang.String getTypeCodeExpression()
           
 java.lang.String holderName()
           
 TypeSpec originalType()
           
 void parse()
          Perform the parsing phase, must be called before code generation
 void print(java.io.PrintWriter ps)
          Code generation, generate holder and helper classes.
 void printExtractResult(java.io.PrintWriter ps, java.lang.String resultname, java.lang.String anyname, java.lang.String resulttype)
          Prints the java-commands to extract the contents of the Any anyname into a variable resultname with the type resulttype
 void printInsertIntoAny(java.io.PrintWriter ps, java.lang.String anyname, java.lang.String varname)
          Prints the java-commands to insert the variable varname into the Any anyname
 java.lang.String printReadExpression(java.lang.String streamname)
           
 java.lang.String printReadStatement(java.lang.String varname, java.lang.String streamname)
           
 java.lang.String printWriteStatement(java.lang.String var_name, java.lang.String streamname)
           
 void setEnclosingSymbol(IdlSymbol s)
           
 void setPackage(java.lang.String s)
           
 java.lang.String toString()
           
 java.lang.String typeName()
           
 TypeSpec typeSpec()
           
 
Methods inherited from class org.jacorb.idl.TypeSpec
getIDLTypeName, getJavaTypeName, getTypeCodeExpression, helperName, printExtractExpression, printInsertExpression, set_constr
 
Methods inherited from class org.jacorb.idl.IdlSymbol
addImportedAlias, addImportedName, addImportedName, addImportedNameHolder, deEscapeName, escapeName, generateIncluded, get_token, getEnclosingSymbol, id, is_included, is_pseudo, isEscaped, name, new_num, omgPrefix, printIdMethod, printImport, set_name, set_pseudo, set_token, setPrintPhaseNames
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

originalType

public TypeSpec originalType
the type for which this is an alias

Constructor Detail

AliasTypeSpec

public AliasTypeSpec(TypeSpec ts)
Class constructor,

Parameters:
ts - - the TypeSpec for which to create a new alias
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class TypeSpec

full_name

public java.lang.String full_name()
Returns:
fully scoped IDL identifier

typeName

public java.lang.String typeName()
Overrides:
typeName in class TypeSpec
Returns:
the type name of this alias, which is the name of the original type

typeSpec

public TypeSpec typeSpec()
Overrides:
typeSpec in class TypeSpec

originalType

public TypeSpec originalType()
Returns:
the original type for which this is an alias

setPackage

public void setPackage(java.lang.String s)
Overrides:
setPackage in class TypeSpec

setEnclosingSymbol

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

basic

public boolean basic()
Overrides:
basic in class TypeSpec
Returns:
true if this is a basic type

parse

public void parse()
Perform the parsing phase, must be called before code generation

Overrides:
parse in class TypeSpec

toString

public java.lang.String toString()
Overrides:
toString in class TypeSpec

getTypeCodeExpression

public java.lang.String getTypeCodeExpression()
Overrides:
getTypeCodeExpression in class TypeSpec
Returns:
a string for an expression of type TypeCode that describes this type Note that this is the TypeSpec for the alias type and is not unwound to the original type.

className

public java.lang.String className()

print

public void print(java.io.PrintWriter ps)
Code generation, generate holder and helper classes. Holder classes are only generated for array and sequence types.

Overrides:
print in class TypeSpec

printReadStatement

public java.lang.String printReadStatement(java.lang.String varname,
                                           java.lang.String streamname)
Overrides:
printReadStatement in class TypeSpec

printReadExpression

public java.lang.String printReadExpression(java.lang.String streamname)
Overrides:
printReadExpression in class TypeSpec

printWriteStatement

public java.lang.String printWriteStatement(java.lang.String var_name,
                                            java.lang.String streamname)
Overrides:
printWriteStatement in class TypeSpec

holderName

public java.lang.String holderName()
Overrides:
holderName in class TypeSpec

printInsertIntoAny

public void printInsertIntoAny(java.io.PrintWriter ps,
                               java.lang.String anyname,
                               java.lang.String varname)
Description copied from class: TypeSpec
Prints the java-commands to insert the variable varname into the Any anyname

Overrides:
printInsertIntoAny in class TypeSpec
Parameters:
ps - Stream, the commands shall be written to
anyname - Name of the Any into which the variable shall be inserted
varname - Name of the variable which shall be inserted

printExtractResult

public void printExtractResult(java.io.PrintWriter ps,
                               java.lang.String resultname,
                               java.lang.String anyname,
                               java.lang.String resulttype)
Description copied from class: TypeSpec
Prints the java-commands to extract the contents of the Any anyname into a variable resultname with the type resulttype

Overrides:
printExtractResult in class TypeSpec
Parameters:
ps - Stream, the commands shall be written to
resultname - Name of the result variable
anyname - Name of the Any holding the result
resulttype - Type of the result variable

accept

public void accept(IDLTreeVisitor visitor)
Description copied from class: IdlSymbol
let the visitor pattern do its work...

Overrides:
accept in class IdlSymbol