org.jacorb.idl

Class Interface

public class Interface extends TypeDeclaration implements Scope

Version: $Id: Interface.java,v 1.76 2006/10/14 12:25:25 andre.spiegel Exp $

Author: Gerald Brose

Field Summary
protected static HashSetabstractInterfaces
abstractInterfaces is to keep a record of those interfaces that are abstract so any inheriting interface know what to inherit from.
InterfaceBodybody
SymbolListinheritanceSpec
Constructor Summary
Interface(int num)
Method Summary
voidaccept(IDLTreeVisitor visitor)
booleanbasic()
Objectclone()
TypeDeclarationdeclaration()
override methods from superclass TypeDeclaration
ScopeDatagetScopeData()
StringgetTypeCodeExpression()
getTypeCodeExpression produces a string for an expression of type TypeCode that describes this type.
StringgetTypeCodeExpression(Set knownTypes)
String[]get_ids()
protected booleanhasAbstractBase()
Returns true if this interface has at least one abstract base type.
StringhelperName()
StringholderName()
protected PrintWriteropenOutput(String typeName)
Open a PrintWriter to write to the .java file for typeName.
voidparse()
voidprint(PrintWriter _ps)
protected voidprintElseNarrowFailed(PrintWriter ps)
Prints the else clause of a narrow method that signals general failure.
voidprintExtractResult(PrintWriter ps, String resultname, String anyname, String resulttype)
protected voidprintHelper()
Generate the helper class for an interface
protected voidprintHolder()
Print the holder class for the interface.
protected voidprintImplSkeleton()
voidprintInsertIntoAny(PrintWriter ps, String anyname, String varname)
protected voidprintInterface()
generate the signature interface
protected voidprintIRHelper()
protected voidprintLocalBase()
protected voidprintLocalTie()
protected voidprintNarrow(PrintWriter ps, boolean checked, boolean forCorbaObject)
Generates a narrow method for the Helper class.
protected voidprintOperations()
generate the operations Java interface (not for pseudo interfaces)
protected voidprintPackage(PrintWriter ps)
StringprintReadExpression(String Streamname)
protected voidprintStub()
Generates a stub class for this Interface
protected voidprintStubInterposition(PrintWriter ps)
Generates the code for a narrow method with which a stub is inserted between an object implementation and the client.
protected voidprintSuperclassImports(PrintWriter ps)
If this interface inherits from classes in the unnamed package, generate explicit import statements for them.
protected voidprintTieSkeleton()
print the stream-based skeleton class
StringprintWriteStatement(String var_name, String Streamname)
voidsetEnclosingSymbol(IdlSymbol s)
voidsetPackage(String s)
voidsetScopeData(ScopeData data)
voidset_abstract()
voidset_included(boolean i)
voidset_locality(boolean local)
set by the parser after creating this object depending on the presence of the "local" modifier.
StringtoString()
StringtypeName()

Field Detail

abstractInterfaces

protected static HashSet abstractInterfaces
abstractInterfaces is to keep a record of those interfaces that are abstract so any inheriting interface know what to inherit from.

body

public InterfaceBody body

inheritanceSpec

public SymbolList inheritanceSpec

Constructor Detail

Interface

public Interface(int num)

Method Detail

accept

public void accept(IDLTreeVisitor visitor)

basic

public boolean basic()

clone

public Object clone()

declaration

public TypeDeclaration declaration()
override methods from superclass TypeDeclaration

getScopeData

public ScopeData getScopeData()

getTypeCodeExpression

public String getTypeCodeExpression()
getTypeCodeExpression produces a string for an expression of type TypeCode that describes this type.

Returns: a string value.

getTypeCodeExpression

public String getTypeCodeExpression(Set knownTypes)

get_ids

public String[] get_ids()

hasAbstractBase

protected boolean hasAbstractBase()
Returns true if this interface has at least one abstract base type.

helperName

public String helperName()

holderName

public String holderName()

openOutput

protected PrintWriter openOutput(String typeName)
Open a PrintWriter to write to the .java file for typeName.

Returns: null, if the output file already exists and is more recent than the input IDL file.

parse

public void parse()

print

public void print(PrintWriter _ps)

printElseNarrowFailed

protected void printElseNarrowFailed(PrintWriter ps)
Prints the else clause of a narrow method that signals general failure.

printExtractResult

public void printExtractResult(PrintWriter ps, String resultname, String anyname, String resulttype)

printHelper

protected void printHelper()
Generate the helper class for an interface

printHolder

protected void printHolder()
Print the holder class for the interface.

printImplSkeleton

protected void printImplSkeleton()

printInsertIntoAny

public void printInsertIntoAny(PrintWriter ps, String anyname, String varname)

printInterface

protected void printInterface()
generate the signature interface

printIRHelper

protected void printIRHelper()

printLocalBase

protected void printLocalBase()

printLocalTie

protected void printLocalTie()

printNarrow

protected void printNarrow(PrintWriter ps, boolean checked, boolean forCorbaObject)
Generates a narrow method for the Helper class.

Parameters: ps the PrintWriter to which the method will be written checked determines whether an ordinary narrow() method or an unchecked_narrow() method should be generated forCorbaObject determines whether the parameter type of the narrow method is org.omg.CORBA.Object or java.lang.Object

printOperations

protected void printOperations()
generate the operations Java interface (not for pseudo interfaces)

printPackage

protected void printPackage(PrintWriter ps)

printReadExpression

public String printReadExpression(String Streamname)

printStub

protected void printStub()
Generates a stub class for this Interface

printStubInterposition

protected void printStubInterposition(PrintWriter ps)
Generates the code for a narrow method with which a stub is inserted between an object implementation and the client.

printSuperclassImports

protected void printSuperclassImports(PrintWriter ps)
If this interface inherits from classes in the unnamed package, generate explicit import statements for them.

printTieSkeleton

protected void printTieSkeleton()
print the stream-based skeleton class

printWriteStatement

public String printWriteStatement(String var_name, String Streamname)

setEnclosingSymbol

public void setEnclosingSymbol(IdlSymbol s)

setPackage

public void setPackage(String s)

setScopeData

public void setScopeData(ScopeData data)

set_abstract

public void set_abstract()

set_included

public void set_included(boolean i)

set_locality

public void set_locality(boolean local)
set by the parser after creating this object depending on the presence of the "local" modifier.

toString

public String toString()

typeName

public String typeName()