org.jacorb.idl

Class OpDecl

Implemented Interfaces:
Operation, Serializable

public class OpDecl
extends Declaration
implements Operation

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

Author:
Gerald Brose

Field Summary

static int
NO_ATTRIBUTE
static int
ONEWAY
IdlSymbol
myInterface
int
opAttribute
TypeSpec
opTypeSpec
Vector
paramDecls
org.jacorb.idl.RaisesExpr
raisesExpr

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

OpDecl(int num)
class constructor
OpDecl(IdlSymbol myInterface, String name, List paramDecls)
Constructs a normal (not oneway) operation with void return type and no raises-Expression.
OpDecl(IdlSymbol myInterface, int opAttribute, TypeSpec opTypeSpec, String name, List paramDecls, org.jacorb.idl.RaisesExpr raisesExpr)
Constructs a new OpDecl with the given characteristics.

Method Summary

void
accept(IDLTreeVisitor visitor)
let the visitor pattern do its work...
void
getIRInfo(Hashtable irInfoTable)
collect Interface Repository information in the argument hashtable
String
name()
name gives the plain name of the operation
String
opName()
opName gives the mangled name in case of attributes (_get_, _set_).
void
parse()
empty parse
void
print(PrintWriter ps)
void
printDelegatedMethod(PrintWriter ps)
Method code for skeletons
void
printInvocation(PrintWriter ps)
void
printMethod(PrintWriter ps, String classname, boolean is_local, boolean is_abstract)
printMethod produces the method code for stubs.
void
printSignature(PrintWriter ps)
void
printSignature(PrintWriter ps, boolean printModifiers)
void
print_sendc_Method(PrintWriter ps, String classname)
void
setEnclosingSymbol(IdlSymbol s)
void
setPackage(String s)
String
signature()

Methods inherited from class org.jacorb.idl.Declaration

accept

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

NO_ATTRIBUTE

public static final int NO_ATTRIBUTE

Field Value:
0


ONEWAY

public static final int ONEWAY

Field Value:
1


myInterface

public IdlSymbol myInterface


opAttribute

public int opAttribute


opTypeSpec

public TypeSpec opTypeSpec


paramDecls

public Vector paramDecls


raisesExpr

public org.jacorb.idl.RaisesExpr raisesExpr

Constructor Details

OpDecl

public OpDecl(int num)
class constructor


OpDecl

public OpDecl(IdlSymbol myInterface,
              String name,
              List paramDecls)
Constructs a normal (not oneway) operation with void return type and no raises-Expression.


OpDecl

public OpDecl(IdlSymbol myInterface,
              int opAttribute,
              TypeSpec opTypeSpec,
              String name,
              List paramDecls,
              org.jacorb.idl.RaisesExpr raisesExpr)
Constructs a new OpDecl with the given characteristics.

Method Details

accept

public void accept(IDLTreeVisitor visitor)
let the visitor pattern do its work...
Specified by:
accept in interface Operation
Overrides:
accept in interface Declaration


getIRInfo

public void getIRInfo(Hashtable irInfoTable)
collect Interface Repository information in the argument hashtable


name

public String name()
name gives the plain name of the operation
Specified by:
name in interface Operation
Overrides:
name in interface IdlSymbol

Returns:
a String value


opName

public String opName()
opName gives the mangled name in case of attributes (_get_, _set_).
Specified by:
opName in interface Operation

Returns:
a String value


parse

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


print

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


printDelegatedMethod

public void printDelegatedMethod(PrintWriter ps)
Method code for skeletons
Specified by:
printDelegatedMethod in interface Operation

Parameters:
ps - a PrintWriter value


printInvocation

public void printInvocation(PrintWriter ps)
Specified by:
printInvocation in interface Operation


printMethod

public void printMethod(PrintWriter ps,
                        String classname,
                        boolean is_local,
                        boolean is_abstract)
printMethod produces the method code for stubs.
Specified by:
printMethod in interface Operation

Parameters:
ps - a PrintWriter value
classname - a String value
is_local - a boolean value
is_abstract - a boolean value used by Interface to denote an abstract.


printSignature

public void printSignature(PrintWriter ps)
Specified by:
printSignature in interface Operation


printSignature

public void printSignature(PrintWriter ps,
                           boolean printModifiers)
Specified by:
printSignature in interface Operation

Parameters:
printModifiers - whether "public abstract" should be added


print_sendc_Method

public void print_sendc_Method(PrintWriter ps,
                               String classname)
Specified by:
print_sendc_Method in interface Operation


setEnclosingSymbol

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


setPackage

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


signature

public String signature()
Specified by:
signature in interface Operation