public class JacorbVisitor
extends JavaMappingGeneratingVisitor
XmlIdlCompiler and gets called by
org.jacorb.idl.parser#compile(String[], StringWriter).
It walks the tree of IDL parser nodes and collects information about ACS interfaces and
typedefs, structs and those interfaces that are affected by XML.
It does not rename any tree nodes nor does it generate code.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACSCOMPONENT_IDLTYPE |
static java.lang.String |
ACSOFFSHOOT_IDLTYPE |
static java.lang.String |
XML_ENTITY_STRUCT_NAME |
| Constructor and Description |
|---|
JacorbVisitor() |
| Modifier and Type | Method and Description |
|---|---|
static Interface |
resolveForwardDecl(Interface interfce)
If the given interface is instantiated from a forward declaration then
this method returns the corresponding Interface object that contains the actual definition.
|
void |
visitAlias(AliasTypeSpec alias)
We override this to detect all XmlEntityStruct typedefs, even if they do not get used
as parameters or struct members inside our own IDL file, be it directly or through other typedefs.
|
void |
visitDeclaration(Declaration declaration)
Overridden to avoid the annoying log that the base impl produces.
|
void |
visitEnum(EnumType enumType)
We override this method only to fix a bug with an endless loop in the base class.
|
void |
visitInterface(Interface interfce) |
void |
visitInterfaceBody(InterfaceBody body)
We override this method in order to descend not only to operations
but also to inner structs and typedefs.
|
void |
visitModule(Module module) |
void |
visitOpDecl(OpDecl op) |
void |
visitParamDecl(ParamDecl param)
We override this method to check if a parameter is of an XML-related type
and to mark the respective interface.
|
void |
visitSpec(Spec spec)
The top-level call, from which we start walking the IDL parse tree
using mostly the base class implementation of the tree descend.
|
void |
visitStruct(StructType struct) |
public static final java.lang.String XML_ENTITY_STRUCT_NAME
public static final java.lang.String ACSCOMPONENT_IDLTYPE
public static final java.lang.String ACSOFFSHOOT_IDLTYPE
public void visitSpec(Spec spec)
public void visitModule(Module module)
public void visitAlias(AliasTypeSpec alias)
This method corresponds to alma.tools.idlgen.IdlTreeManipulator#findXmlTypedefNodes(IdlObject, Set)
in the OpenORB based implementation.
public void visitStruct(StructType struct)
public void visitInterface(Interface interfce)
public void visitInterfaceBody(InterfaceBody body)
org.jacorb.idl.InterfaceBody#print(PrintWriter)public void visitOpDecl(OpDecl op)
public void visitParamDecl(ParamDecl param)
The check is simple enough so that we could inline it in visitOpDecl(OpDecl),
but by using visitParamDecl we cleanly follow jacorb's visitor pattern.
public static Interface resolveForwardDecl(Interface interfce)
public void visitDeclaration(Declaration declaration)
public void visitEnum(EnumType enumType)
Note that the normal jacorb run does not call EnumType#accept which calls the broken "visitEnum", but instead it calls EnumType#print, so that the bug in JavaMappingGeneratingVisitor goes unnoticed.