org.jacorb.idl

Class Interface

Implemented Interfaces:
Scope
Known Direct Subclasses:
ReplyHandler

public class Interface
extends TypeDeclaration
implements Scope

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

Author:
Gerald Brose

Field Summary

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.
InterfaceBody
body
SymbolList
inheritanceSpec

Fields inherited from class org.jacorb.idl.TypeDeclaration

type_decl

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

Interface(int num)
class constructor

Method Summary

void
accept(IDLTreeVisitor visitor)
let the visitor pattern do its work...
boolean
basic()
Object
clone()
TypeDeclaration
declaration()
override methods from superclass TypeDeclaration
ScopeData
getScopeData()
String
getTypeCodeExpression()
getTypeCodeExpression produces a string for an expression of type TypeCode that describes this type.
String
getTypeCodeExpression(Set knownTypes)
String[]
get_ids()
String
holderName()
protected PrintWriter
openOutput(String typeName)
Open a PrintWriter to write to the .java file for typeName.
void
parse()
empty parse
void
print(PrintWriter _ps)
protected void
printClassComment(String className, PrintWriter ps)
protected void
printHelper()
Generate the helper class for an interface
protected void
printHolder()
Print the holder class for the interface.
protected void
printIRHelper()
protected void
printImplSkeleton()
protected void
printInterface()
generate the signature interface
protected void
printLocalBase()
protected void
printLocalTie()
protected void
printOperations()
generate the operations Java interface (not for pseudo interfaces)
protected void
printPackage(PrintWriter ps)
String
printReadExpression(String Streamname)
protected void
printStub()
Generates a stub class for this Interface
protected void
printSuperclassImports(PrintWriter ps)
If this interface inherits from classes in the unnamed package, generate explicit import statements for them.
protected void
printTieSkeleton()
print the stream-based skeleton class
String
printWriteStatement(String var_name, String Streamname)
void
setEnclosingSymbol(IdlSymbol s)
void
setPackage(String s)
void
setScopeData(ScopeData data)
void
set_abstract()
void
set_included(boolean i)
used by the lexer to mark this symbol as included from another IDL file
void
set_locality(boolean local)
set by the parser after creating this object depending on the presence of the "local" modifier.
String
toString()
String
typeName()

Methods inherited from class org.jacorb.idl.TypeDeclaration

accept, basic, clone, declaration, getIDLTypeName, getJavaTypeName, getRecursiveTypeCodeExpression, getTypeCodeExpression, getTypeCodeExpression, holderName, markTypeDefd, parse, print, printReadExpression, printReadStatement, printWriteStatement, setEnclosingSymbol, setPackage, set_included, toString, typeName

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

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 Details

Interface

public Interface(int num)
class constructor

Method Details

accept

public void accept(IDLTreeVisitor visitor)
let the visitor pattern do its work...
Overrides:
accept in interface TypeDeclaration


basic

public boolean basic()
Overrides:
basic in interface TypeDeclaration


clone

public Object clone()
Overrides:
clone in interface TypeDeclaration


declaration

public TypeDeclaration declaration()
override methods from superclass TypeDeclaration
Overrides:
declaration in interface TypeDeclaration


getScopeData

public ScopeData getScopeData()
Specified by:
getScopeData in interface Scope


getTypeCodeExpression

public String getTypeCodeExpression()
getTypeCodeExpression produces a string for an expression of type TypeCode that describes this type.
Overrides:
getTypeCodeExpression in interface TypeDeclaration

Returns:
a string value.


getTypeCodeExpression

public String getTypeCodeExpression(Set knownTypes)
Overrides:
getTypeCodeExpression in interface TypeDeclaration


get_ids

public String[] get_ids()


holderName

public String holderName()
Overrides:
holderName in interface TypeDeclaration


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()
empty parse
Overrides:
parse in interface TypeDeclaration


print

public void print(PrintWriter _ps)
Overrides:
print in interface TypeDeclaration


printClassComment

protected void printClassComment(String className,
                                 PrintWriter ps)


printHelper

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


printHolder

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


printIRHelper

protected void printIRHelper()


printImplSkeleton

protected void printImplSkeleton()


printInterface

protected void printInterface()
generate the signature interface


printLocalBase

protected void printLocalBase()


printLocalTie

protected void printLocalTie()


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)
Overrides:
printReadExpression in interface TypeDeclaration


printStub

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


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)
Overrides:
printWriteStatement in interface TypeDeclaration


setEnclosingSymbol

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


setPackage

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


setScopeData

public void setScopeData(ScopeData data)
Specified by:
setScopeData in interface Scope


set_abstract

public void set_abstract()


set_included

public void set_included(boolean i)
used by the lexer to mark this symbol as included from another IDL file
Overrides:
set_included in interface TypeDeclaration


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()
Overrides:
toString in interface TypeDeclaration


typeName

public String typeName()
Overrides:
typeName in interface TypeDeclaration