Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::tools::idlgen::JavaGenerator Class Reference

List of all members.

Public Member Functions

 JavaGenerator (Set xmlTypedefNodes, Set nodesToBeGenerated)
void translate_object_content (IdlObject obj, File writeInto, int translateType)
void translate_interface (IdlObject obj, File writeInto)
void write_helper (IdlObject obj, File writeInto)
void write_holder (IdlObject obj, File writeInto)
PrintWriter fileAccess (File writeInto)
void translate_type (IdlObject obj, PrintWriter output)
void translate_parameter (IdlObject obj, PrintWriter output, int attr)
void addDescriptiveHeader (PrintWriter output, IdlObject obj)
void translate_exception (IdlObject obj, File writeInto)
File createDirectory (String name, File writeInto)

Static Public Member Functions

NamingConventions getNamingConventions ()

Package Functions

void setIdlStruct2JavaBindingClassMappings (String mappings)
String getXmlBindingClass (String structTypeName)

Private Attributes

Set m_xmlTypedefNodes
Map m_struct2JavaMap
Set m_nodesToBeGenerated

Detailed Description

Author:
hsommer


Constructor & Destructor Documentation

alma::tools::idlgen::JavaGenerator::JavaGenerator Set  xmlTypedefNodes,
Set  nodesToBeGenerated
[inline]
 

Constructor for JavaGenerator.


Member Function Documentation

void alma::tools::idlgen::JavaGenerator::addDescriptiveHeader PrintWriter  output,
IdlObject  obj
[inline]
 

See also:
org.openorb.compiler.generator.IdlToJava#addDescriptiveHeader(java.io.PrintWriter, org.openorb.compiler.object.IdlObject)

File alma::tools::idlgen::JavaGenerator::createDirectory String  name,
File  writeInto
[inline]
 

PrintWriter alma::tools::idlgen::JavaGenerator::fileAccess File  writeInto  )  [inline]
 

Overloaded to use our StrippingPrintWriter instead of a normal PrintWriter

See also:
IdlToJava#fileAccess(File)

NamingConventions alma::tools::idlgen::JavaGenerator::getNamingConventions  )  [inline, static]
 

See also:
NamingConventions::getSuffix()

String alma::tools::idlgen::JavaGenerator::getXmlBindingClass String  structTypeName  )  [inline, package]
 

Translates an IDL xml wrapper struct to the qualified name of the Java binding class that should appear in the "inner" interface.

void alma::tools::idlgen::JavaGenerator::setIdlStruct2JavaBindingClassMappings String  mappings  )  [inline, package]
 

Sets the mappings from XmlEntityStruct typedefs to Java binding classes. For example, ObsProposal=alma.xmljbind.test.obsproposal.ObsProposal would substitute the Java class on the right side for the IDL type ObsProposal, which is defined as typedef xmlentity::XmlEntityStruct ObsProposal; in the IDL file.

Parameters:
mappings concatenated mappings, separated by ';'

void alma::tools::idlgen::JavaGenerator::translate_exception IdlObject  obj,
File  writeInto
[inline]
 

See also:
org.openorb.compiler.generator.IdlToJava#translate_typedef(org.openorb.compiler.object.IdlObject, java.io.File)

void alma::tools::idlgen::JavaGenerator::translate_interface IdlObject  obj,
File  writeInto
[inline]
 

See also:
IdlToJava#translate_interface(IdlObject, File) Method body copied with slight modifications from IdlToJava#translate_interface_operations.

void alma::tools::idlgen::JavaGenerator::translate_object_content IdlObject  obj,
File  writeInto,
int  translateType
[inline]
 

See also:
IdlToJava#translate_object_content(IdlObject, File, int)

void alma::tools::idlgen::JavaGenerator::translate_parameter IdlObject  obj,
PrintWriter  output,
int  attr
[inline]
 

See also:
IdlToJava#translate_parameter(IdlObject, PrintWriter, int)

void alma::tools::idlgen::JavaGenerator::translate_type IdlObject  obj,
PrintWriter  output
[inline]
 

See also:
IdlToJava#translate_type(IdlObject, PrintWriter)

void alma::tools::idlgen::JavaGenerator::write_helper IdlObject  obj,
File  writeInto
[inline]
 

Suppresses generation of helper classes and acts as a dirty shortcut to generate holder classes for typedefs.

According to the OMG IDL2Java mapping, Typedefs for types that are neither arrays nor sequences are unwound to their original type until a simple IDL type or user-defined IDL type (of the non typedef variety) is encountered. Holder classes are generated for sequence and array typedefs only. The unwound type’s Holder class is used for the other cases.

A SchedBlock typedef would not get its own SchedBlockHolder according to the mapping rules, but EntityStructHolder would be used instead. For the XML-binding interface, we do need a typesafe holder for the Java binding class. Therefore, an additional holder class must be constructed, outside of the course of the OpenORB compiler, which only attempts to generate the standard mappings. This class generation is conveniently triggered from the write_helper method because it already has the right package info. Sorry for the confusion...

See also:
IdlToJava#write_helper(IdlObject, File)

void alma::tools::idlgen::JavaGenerator::write_holder IdlObject  obj,
File  writeInto
[inline]
 

See also:
IdlToJava#write_holder(IdlObject, File)


Member Data Documentation

Set alma::tools::idlgen::JavaGenerator::m_nodesToBeGenerated [private]
 

used as a filter to exclude idl nodes from generation, e.g. interfaces without xml entity objects

Map alma::tools::idlgen::JavaGenerator::m_struct2JavaMap [private]
 

Set alma::tools::idlgen::JavaGenerator::m_xmlTypedefNodes [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:07:29 2009 for ACS Java API by doxygen 1.3.8