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 org.jacorb.idl.TemplateTypeSpec
Common super class for arrays and sequences
- Version:
- $Id: VectorType.java,v 1.14 2005/10/03 21:13:22 andre.spiegel Exp $
- Author:
- Gerald Brose
Field Summary |
protected boolean |
typedefd
|
Method Summary |
boolean |
basic()
|
protected java.lang.String |
elementTypeExpression()
|
java.lang.String |
elementTypeName()
|
TypeSpec |
elementTypeSpec()
|
abstract java.lang.String |
helperName()
|
abstract java.lang.String |
holderName()
|
abstract int |
length()
|
void |
markTypeDefd()
we have to be able to distinguish between explicitly typedef'd
type names and anonymously defined type names |
void |
parse()
empty parse |
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)
|
void |
setTypeSpec(org.jacorb.idl.SimpleTypeSpec sts)
|
java.lang.String |
toString()
|
java.lang.String |
typeName()
|
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 |
accept, 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 |
typedefd
protected boolean typedefd
VectorType
public VectorType(int num)
elementTypeSpec
public TypeSpec elementTypeSpec()
- Returns:
- the TypeSpec for the sequence's element type
setTypeSpec
public void setTypeSpec(org.jacorb.idl.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
parse
public void parse()
throws ParseException
- Description copied from class:
IdlSymbol
- empty parse
- Overrides:
parse
in class TypeSpec
- Throws:
ParseException
markTypeDefd
public void markTypeDefd()
- we have to be able to distinguish between explicitly typedef'd
type names and anonymously defined type names
basic
public boolean basic()
- Overrides:
basic
in class TypeSpec
- Returns:
- true if this is a basic type