org.jacorb.idl
Class AliasTypeSpec
java.lang.Object
org.jacorb.idl.runtime.symbol
org.jacorb.idl.IdlSymbol
org.jacorb.idl.TypeSpec
org.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
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 |
originalType
public TypeSpec originalType
- the type for which this is an alias
AliasTypeSpec
public AliasTypeSpec(TypeSpec ts)
- Class constructor,
- Parameters:
ts
- - the TypeSpec for which to create a new alias
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 toanyname
- Name of the Any into which the variable shall be insertedvarname
- 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 toresultname
- Name of the result variableanyname
- Name of the Any holding the resultresulttype
- 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