org.jacorb.idl
Class VectorType
java.lang.Object
org.jacorb.idl.runtime.symbol
org.jacorb.idl.IdlSymbol
org.jacorb.idl.TypeSpec
org.jacorb.idl.SimpleTypeSpec
org.jacorb.idl.TemplateTypeSpec
org.jacorb.idl.VectorType
- Direct Known Subclasses:
- ArrayTypeSpec, SequenceType
public abstract class VectorType
- extends TemplateTypeSpec
Common super class for arrays and sequences
- Version:
- $Id: VectorType.java,v 1.16 2007-02-06 22:50:35 andre.spiegel Exp $
- Author:
- Gerald Brose
Methods inherited from class org.jacorb.idl.TypeSpec |
clone, getIDLTypeName, getJavaTypeName, getTypeCodeExpression, getTypeCodeExpression, print, printExtractExpression, printInsertExpression, printReadStatement, printWriteStatement, set_constr, setEnclosingSymbol, setPackage, typeSpec |
Methods inherited from class org.jacorb.idl.IdlSymbol |
addImportedAlias, addImportedName, addImportedName, addImportedNameHolder, deEscapeName, escapeName, generateIncluded, get_token, getEnclosingSymbol, getFullName, id, is_included, is_pseudo, isEscaped, name, new_num, omgPrefix, printClassComment, 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 |
VectorType
public VectorType(int num)
elementTypeSpec
public TypeSpec elementTypeSpec()
- Returns:
- the TypeSpec for the sequence's element type
setTypeSpec
public void setTypeSpec(SimpleTypeSpec sts)
typeName
public java.lang.String typeName()
- Overrides:
typeName
in class TypeSpec
- Returns:
- this sequences Java type name, i.e., the element type with
"[]" appended.
printReadExpression
public java.lang.String printReadExpression(java.lang.String streamname)
- Overrides:
printReadExpression
in class TypeSpec
elementTypeExpression
protected java.lang.String elementTypeExpression()
elementTypeName
public java.lang.String elementTypeName()
length
public abstract int length()
- Returns:
- the length of this array or sequence. For
multi-dimensional vectors, this is the outermost dimension.
For open sequences, this length is 0.
holderName
public abstract java.lang.String holderName()
- Overrides:
holderName
in class TypeSpec
helperName
public abstract java.lang.String helperName()
- Overrides:
helperName
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
toString
public java.lang.String toString()
- Overrides:
toString
in class TypeSpec
accept
public void accept(IDLTreeVisitor visitor)
- Description copied from class:
IdlSymbol
- let the visitor pattern do its work...
- Overrides:
accept
in class SimpleTypeSpec
getTCKind
public int getTCKind()
- Overrides:
getTCKind
in class SimpleTypeSpec