org.jacorb.idl
Class Interface

java.lang.Object
  extended byorg.jacorb.idl.runtime.symbol
      extended byorg.jacorb.idl.IdlSymbol
          extended byorg.jacorb.idl.Declaration
              extended byorg.jacorb.idl.TypeDeclaration
                  extended byorg.jacorb.idl.Interface
All Implemented Interfaces:
Scope
Direct Known Subclasses:
ReplyHandler

public class Interface
extends TypeDeclaration
implements Scope


Field Summary
protected static java.util.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)
           
 
Method Summary
 void accept(IDLTreeVisitor visitor)
          let the visitor pattern do its work...
 boolean basic()
           
 java.lang.Object clone()
           
 TypeDeclaration declaration()
          override methods from superclass TypeDeclaration
 java.lang.String[] get_ids()
           
 ScopeData getScopeData()
           
 java.lang.String getTypeCodeExpression()
          getTypeCodeExpression produces a string for an expression of type TypeCode that describes this type.
 java.lang.String getTypeCodeExpression(java.util.Set knownTypes)
          Returns a type code expression (for use in generated code) for this type.
 java.lang.String helperName()
           
 java.lang.String holderName()
           
protected  java.io.PrintWriter openOutput(java.lang.String typeName)
          Open a PrintWriter to write to the .java file for typeName.
 void parse()
          empty parse
 void print(java.io.PrintWriter _ps)
           
protected  void printClassComment(java.lang.String className, java.io.PrintWriter ps)
           
 void printExtractResult(java.io.PrintWriter ps, java.lang.String resultname, java.lang.String anyname, java.lang.String resulttype)
           
protected  void printHelper()
          Generate the helper class for an interface
protected  void printHolder()
          Print the holder class for the interface.
protected  void printImplSkeleton()
           
 void printInsertIntoAny(java.io.PrintWriter ps, java.lang.String anyname, java.lang.String varname)
           
protected  void printInterface()
          generate the signature interface
protected  void printIRHelper()
           
protected  void printLocalBase()
           
protected  void printLocalTie()
           
protected  void printOperations()
          generate the operations Java interface (not for pseudo interfaces)
protected  void printPackage(java.io.PrintWriter ps)
           
 java.lang.String printReadExpression(java.lang.String Streamname)
           
protected  void printStub()
          Generates a stub class for this Interface
protected  void printSuperclassImports(java.io.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
 java.lang.String printWriteStatement(java.lang.String var_name, java.lang.String Streamname)
           
 void set_abstract()
           
 void set_included(boolean i)
           
 void set_locality(boolean local)
          set by the parser after creating this object depending on the presence of the "local" modifier.
 void setEnclosingSymbol(IdlSymbol s)
           
 void setPackage(java.lang.String s)
           
 void setScopeData(ScopeData data)
           
 java.lang.String toString()
           
 java.lang.String typeName()
           
 
Methods inherited from class org.jacorb.idl.TypeDeclaration
getIDLTypeName, getJavaTypeName, getRecursiveTypeCodeExpression, markTypeDefd, printReadStatement
 
Methods inherited from class org.jacorb.idl.IdlSymbol
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
 
Methods inherited from interface org.jacorb.idl.Scope
get_token, name
 

Field Detail

body

public InterfaceBody body

inheritanceSpec

public SymbolList inheritanceSpec

abstractInterfaces

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

Constructor Detail

Interface

public Interface(int num)
Method Detail

setScopeData

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

getScopeData

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

setPackage

public void setPackage(java.lang.String s)
Overrides:
setPackage in class TypeDeclaration

set_abstract

public void set_abstract()

declaration

public TypeDeclaration declaration()
override methods from superclass TypeDeclaration

Overrides:
declaration in class TypeDeclaration

typeName

public java.lang.String typeName()
Overrides:
typeName in class TypeDeclaration

clone

public java.lang.Object clone()
Overrides:
clone in class TypeDeclaration

setEnclosingSymbol

public void setEnclosingSymbol(IdlSymbol s)
Overrides:
setEnclosingSymbol in class 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.


getTypeCodeExpression

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

Overrides:
getTypeCodeExpression in class TypeDeclaration
Returns:
a string value.

getTypeCodeExpression

public java.lang.String getTypeCodeExpression(java.util.Set knownTypes)
Description copied from class: TypeDeclaration
Returns a type code expression (for use in generated code) for this type. If `knownTypes' contains this type, then a recursive type code is returned.

Overrides:
getTypeCodeExpression in class TypeDeclaration

basic

public boolean basic()
Overrides:
basic in class TypeDeclaration

holderName

public java.lang.String holderName()
Overrides:
holderName in class TypeDeclaration

helperName

public java.lang.String helperName()
Overrides:
helperName in class TypeDeclaration

toString

public java.lang.String toString()
Overrides:
toString in class TypeDeclaration

set_included

public void set_included(boolean i)
Overrides:
set_included in class TypeDeclaration

printReadExpression

public java.lang.String printReadExpression(java.lang.String Streamname)
Overrides:
printReadExpression in class TypeDeclaration

printWriteStatement

public java.lang.String printWriteStatement(java.lang.String var_name,
                                            java.lang.String Streamname)
Overrides:
printWriteStatement in class TypeDeclaration

parse

public void parse()
Description copied from class: IdlSymbol
empty parse

Overrides:
parse in class TypeDeclaration

openOutput

protected java.io.PrintWriter openOutput(java.lang.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.

printPackage

protected void printPackage(java.io.PrintWriter ps)

printClassComment

protected void printClassComment(java.lang.String className,
                                 java.io.PrintWriter ps)

printSuperclassImports

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


printInterface

protected void printInterface()
generate the signature interface


printOperations

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


printHolder

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


printHelper

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


get_ids

public java.lang.String[] get_ids()

printStub

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


printImplSkeleton

protected void printImplSkeleton()

printTieSkeleton

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


printIRHelper

protected void printIRHelper()

printLocalBase

protected void printLocalBase()

printLocalTie

protected void printLocalTie()

print

public void print(java.io.PrintWriter _ps)
Overrides:
print in class TypeDeclaration

printInsertIntoAny

public void printInsertIntoAny(java.io.PrintWriter ps,
                               java.lang.String anyname,
                               java.lang.String varname)
Overrides:
printInsertIntoAny in class TypeDeclaration

printExtractResult

public void printExtractResult(java.io.PrintWriter ps,
                               java.lang.String resultname,
                               java.lang.String anyname,
                               java.lang.String resulttype)
Overrides:
printExtractResult in class TypeDeclaration

accept

public void accept(IDLTreeVisitor visitor)
Description copied from class: IdlSymbol
let the visitor pattern do its work...

Overrides:
accept in class TypeDeclaration