|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openorb.compiler.generator.IdlToJava
This class generates all mapping for IDL descriptions.
Field Summary | |
IdlObject |
_root
Reference to the compilation graph |
java.lang.String |
current_pkg
Current package |
static java.lang.String |
tab
|
static java.lang.String |
tab1
|
static java.lang.String |
tab2
|
static java.lang.String |
tab3
|
static java.lang.String |
tab4
|
static java.lang.String |
tab5
|
static java.lang.String |
tab6
|
Constructor Summary | |
IdlToJava()
Default constructor |
Method Summary | |
void |
addDescriptiveHeader(java.io.PrintWriter output,
IdlObject obj)
Add a descriptive header in a Java file |
void |
addPackageName(java.io.PrintWriter output)
|
void |
addToPkg(IdlObject obj,
java.lang.String name)
Construct a package name |
java.io.File |
createDirectory(java.lang.String name,
java.io.File writeInto)
Creates a directory |
java.io.File |
createPrefixDirectories(java.lang.String prefix,
java.io.File writeInto)
Creates the directories corresponding to a CORBA ID prefix |
java.io.PrintWriter |
fileAccess(java.io.File writeInto)
Allows to get an access on write to a target file |
int |
final_kind(IdlObject obj)
Returns the final type of a data type |
IdlObject |
final_type(IdlObject obj)
Returns the final definition of a data type |
java.lang.String |
find_default_value(IdlObject obj)
Search the default value for an union |
java.lang.String |
fullname(IdlObject obj)
Returns the complete name of a CORBA object |
java.lang.String |
get_array_name(IdlObject obj)
Return simple array name or null else |
IdlContext |
getContext(IdlObject obj)
Return the context associated with an operation |
java.io.File |
getDirectory(java.lang.String name,
java.io.File writeInto)
Get a write access in a directory |
java.io.File |
getPrefixDirectories(java.lang.String prefix,
java.io.File writeInto)
Get a writing access to a directory corresponding to a CORBA ID prefix |
java.lang.String |
IdlEspaceCharToJavaEscapeChar(java.lang.String expr)
Change the IDL escape characters into CORBA escape characters |
java.lang.String |
IdlScopeToJavaScope(java.lang.String expr,
boolean complete,
boolean fixed,
IdlObject obj)
Translate a Scope IDL Ident::Ident into Scoped Java Ident.Ident.value |
java.lang.String |
inversedPrefix(java.lang.String prefix)
Change a prefix order : omg.org -> org.omg |
boolean |
isAbstractBaseInterface(IdlObject obj)
This function is used to test if an interface has some inherits from bases abstracts interfaces |
boolean |
isEmpty(IdlObject obj)
Check a type is empty in terms of type union, struct or enum |
boolean |
isEmptyInterface(IdlObject obj)
This method an interface is empty in terms of type typedef, union, exception... |
boolean |
isEmptyValue(IdlObject obj)
This method check a value type is empty in terms of type typedef, union, exception... |
boolean |
isEnumCase(java.lang.String expr)
Check if the the id is an enum member |
boolean |
isHexaCar(char c)
Allow to test if the character is an hexa number |
boolean |
isInto(java.util.List opList,
IdlObject obj)
Check if the operation or the attribute is already in the list |
boolean |
isNativeDefinition(IdlObject obj)
Retur true if a definition exists for a native type |
boolean |
isSameScope(java.lang.String ident,
IdlObject obj)
Returns true if the element passed as argument is in the same scope as the second argument. |
boolean |
isTruncatable(IdlObject obj)
This function looks for a truncatable interface in value type inheritance |
void |
javadoc(java.io.PrintWriter output,
IdlObject obj)
Add a JavaDoc comment |
java.io.PrintWriter |
newFile(java.io.File writeInto,
java.lang.String name)
Creates a new Java file |
void |
printConcreteTypeCode(IdlObject obj,
java.io.PrintWriter output)
This function prints the concrete base value type TypeCode |
void |
printNativeDefinition(IdlObject obj,
java.io.PrintWriter output)
Print the type translated corresponding to a natibe type definition |
int |
recursion(IdlObject obj)
Find include depth for an object |
java.lang.String |
removePackageName(java.lang.String expr)
Delete the package of an id |
void |
translate_any_insert(IdlObject obj,
java.io.PrintWriter output,
java.lang.String aname,
java.lang.String tname)
Translate an any insert |
void |
translate_attribute_stub_stream(IdlObject obj,
java.io.PrintWriter output)
Translate an attribute with Stream mode |
void |
translate_attribute_stub(IdlObject obj,
java.io.PrintWriter output)
Translate an attribute |
void |
translate_attribute_tie(IdlObject obj,
java.io.PrintWriter output)
Translate an attribute for a TIE approach |
void |
translate_attribute(IdlObject obj,
java.io.PrintWriter output)
Translate an attribute |
void |
translate_comment_section(java.io.PrintWriter output,
java.lang.String description,
IdlObject obj)
Translate a JavaDoc comments section |
void |
translate_constant(IdlObject obj,
java.io.File writeInto,
java.io.PrintWriter print)
Translate a constant |
void |
translate_enum(IdlObject obj,
java.io.File writeInto)
Translate an enumeration |
void |
translate_exception(IdlObject obj,
java.io.File writeInto)
Translate an exception |
void |
translate_interface_operations(IdlObject obj,
java.io.File writeInto)
Translate the operations declaration of an interface |
void |
translate_interface_skel(IdlObject obj,
java.io.File writeInto)
Translate a skeleton for an interface |
void |
translate_interface_stub(IdlObject obj,
java.io.File writeInto)
Translate a syub for an interface |
void |
translate_interface_tie(IdlObject obj,
java.io.File writeInto)
Translate a TIE approach for an interface |
void |
translate_interface(IdlObject obj,
java.io.File writeInto)
Translate an interface |
void |
translate_marshalling_data(IdlObject obj,
java.io.PrintWriter output,
java.lang.String outname,
java.lang.String tname)
Encode a data type |
void |
translate_marshalling_member(IdlObject obj,
java.io.PrintWriter output,
java.lang.String outname,
java.lang.String tname,
java.lang.String space)
Encode a member data type |
void |
translate_marshalling(IdlObject obj,
java.io.PrintWriter output,
java.lang.String outname,
java.lang.String tname)
Encode a data type |
void |
translate_module(IdlObject obj,
java.io.File writeInto,
int translateType)
Translate a module |
void |
translate_native(IdlObject obj,
java.io.File writeInto)
Translate a native type |
void |
translate_new_typecode(IdlObject obj,
java.io.PrintWriter output)
Construct a new TypeCode |
void |
translate_object_content(IdlObject obj,
java.io.File writeInto,
int translateType)
Translate an object content |
void |
translate_object(IdlObject obj,
java.io.File writeInto,
int translateType)
Translate the data from a container object (Module, Interface, Root) |
void |
translate_operation_skel_stream(IdlObject obj,
java.io.PrintWriter output)
Translate an operation for a skeleton with Stream mode |
void |
translate_operation_skel(IdlObject obj,
java.io.PrintWriter output)
Translate an operation for a skeleton |
void |
translate_operation_stub_stream(IdlObject obj,
java.io.PrintWriter output)
Translate an operation in Stream mode |
void |
translate_operation_stub(IdlObject obj,
java.io.PrintWriter output)
Translate an operation |
void |
translate_operation_tie(IdlObject obj,
java.io.PrintWriter output)
Translate an operation for the TIE approach |
void |
translate_operation(IdlObject obj,
java.io.PrintWriter output)
Translate an operation |
void |
translate_parameter(IdlObject obj,
java.io.PrintWriter output,
int attr)
Translate a parameter |
void |
translate_read_attribute_skel_stream(IdlObject obj,
java.io.PrintWriter output)
Translate a read attribute for a Stream mode skeleton |
void |
translate_read_attribute_skel(IdlObject obj,
java.io.PrintWriter output)
Translate a read attribute for a skeleton |
void |
translate_state_member(IdlObject obj,
java.io.PrintWriter output)
Translate a value type state |
void |
translate_struct(IdlObject obj,
java.io.File writeInto)
Translate the structure |
java.lang.String |
translate_to_java_expression(java.lang.String expr,
boolean fixed,
IdlObject obj)
Translate an IDL expression into a Java expression |
java.lang.String |
translate_to_union_case_expression(IdlUnionMember disc,
java.lang.String expr)
Translate an IDL expression into an union expression |
void |
translate_type(IdlObject obj,
java.io.PrintWriter output)
Translate a data type |
void |
translate_typecode(IdlObject obj,
java.io.PrintWriter output)
Translate a TypeCode |
void |
translate_typedef(IdlObject obj,
java.io.File writeInto)
Translate a typedef |
void |
translate_union(IdlObject obj,
java.io.File writeInto)
Translate an union |
void |
translate_unmarshalling_data(IdlObject obj,
java.io.PrintWriter output,
java.lang.String inname)
Decode a data type |
void |
translate_unmarshalling_member(IdlObject obj,
java.io.PrintWriter output,
java.lang.String inname,
java.lang.String tname,
java.lang.String space)
Encode a member data type |
void |
translate_unmarshalling(IdlObject obj,
java.io.PrintWriter output,
java.lang.String inname)
Decode a data type |
void |
translate_user_attribute(IdlObject obj,
java.io.PrintWriter output)
Translate an attribute for the user code |
void |
translate_user_interface(IdlObject obj,
java.io.File writeInto)
Translate an interface for the user |
void |
translate_user_module(IdlObject obj,
java.io.File writeInto)
Translate a user module |
void |
translate_user_object(IdlObject obj,
java.io.File writeInto)
Translate the data from a container object (Module, Interface, Root) for the user code |
void |
translate_user_operation(IdlObject obj,
java.io.PrintWriter output)
Translate an operation for the user code |
void |
translate_value_box(IdlObject obj,
java.io.File writeInto)
Translate a Value Box |
void |
translate_value_type(IdlObject obj,
java.io.File writeInto)
Translate a Value Type |
void |
translate_write_attribute_skel_stream(IdlObject obj,
java.io.PrintWriter output)
Translate a write attribute for a Stream mode skeleton |
void |
translate_write_attribute_skel(IdlObject obj,
java.io.PrintWriter output)
Translate a write attribute for a skeleton |
void |
translateData(IdlObject obj,
java.lang.String packageName)
Translate the data from IDL to Java |
void |
translateSkeleton(IdlObject obj,
java.lang.String packageName)
Creates the skeleton |
void |
translateStub(IdlObject obj,
java.lang.String packageName)
Creates the stub |
void |
translateTIE(IdlObject obj,
java.lang.String packageName)
Create the class for the delegation |
void |
translateUser(IdlObject obj,
java.lang.String packageName)
Generate the user code (implementation class) |
void |
write_helper(IdlObject obj,
java.io.File writeInto)
Add a Helper for a data type |
void |
write_holder(IdlObject obj,
java.io.File writeInto)
Add an holder for a data type |
void |
writeDefaultAttribute(java.io.PrintWriter output,
IdlAttribute obj)
|
void |
writeDefaultMethods(java.io.PrintWriter output,
IdlObject obj,
java.util.Set ids)
|
void |
writeDefaultMethodsForInterfaces(java.io.PrintWriter output,
java.util.List list,
java.util.Set ids)
|
void |
writeDefaultMethodsForValueTypes(java.io.PrintWriter output,
java.util.List list,
java.util.Set ids)
|
void |
writeDefaultOperation(java.io.PrintWriter output,
IdlOp obj)
|
void |
writeDefaultValueFactory(IdlValue obj,
java.io.File writeInto)
|
void |
writeDefaultValueImpl(IdlValue obj,
java.io.File writeInto)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String tab
public static final java.lang.String tab1
public static final java.lang.String tab2
public static final java.lang.String tab3
public static final java.lang.String tab4
public static final java.lang.String tab5
public static final java.lang.String tab6
public java.lang.String current_pkg
public IdlObject _root
Constructor Detail |
public IdlToJava()
Method Detail |
public boolean isNativeDefinition(IdlObject obj)
obj
- native objectpublic void printNativeDefinition(IdlObject obj, java.io.PrintWriter output)
obj
- native objectoutput
- file where definition is addedpublic java.io.PrintWriter fileAccess(java.io.File writeInto)
writeInto
- Target file descriptorpublic java.lang.String inversedPrefix(java.lang.String prefix)
prefix
- the prefix to inversepublic java.io.PrintWriter newFile(java.io.File writeInto, java.lang.String name)
writeInto
- the directory where the file must be createdname
- file name (without .java extension)public java.io.File createDirectory(java.lang.String name, java.io.File writeInto)
name
- the directory name to createwriteInto
- the directory in which the search has to appearpublic java.io.File createPrefixDirectories(java.lang.String prefix, java.io.File writeInto)
prefix
- the prefixwriteInto
- the directory in which the search has to appearpublic java.io.File getDirectory(java.lang.String name, java.io.File writeInto)
name
- the directory namewriteInto
- the directory in which the search has to appearpublic java.io.File getPrefixDirectories(java.lang.String prefix, java.io.File writeInto)
prefix
- a object prefixwriteInto
- the directory in which the search has to appearpublic void addToPkg(IdlObject obj, java.lang.String name)
name
- name of the superior levelpublic void addPackageName(java.io.PrintWriter output)
public void addDescriptiveHeader(java.io.PrintWriter output, IdlObject obj)
output
- the target fileobj
- object which descriptive header has to be addedpublic void translate_comment_section(java.io.PrintWriter output, java.lang.String description, IdlObject obj)
public void javadoc(java.io.PrintWriter output, IdlObject obj)
output
- the target fileobj
- the object the header has to be addedpublic int final_kind(IdlObject obj)
obj
- the objectpublic IdlObject final_type(IdlObject obj)
obj
- the objectpublic java.lang.String fullname(IdlObject obj)
obj
- the object the name has to be retrievedpublic java.lang.String removePackageName(java.lang.String expr)
public boolean isEnumCase(java.lang.String expr)
public boolean isSameScope(java.lang.String ident, IdlObject obj)
public java.lang.String IdlScopeToJavaScope(java.lang.String expr, boolean complete, boolean fixed, IdlObject obj)
expr
- the IDL expressionpublic boolean isHexaCar(char c)
c
- the character to testpublic java.lang.String IdlEspaceCharToJavaEscapeChar(java.lang.String expr)
expr
- the IDL expressionpublic java.lang.String translate_to_java_expression(java.lang.String expr, boolean fixed, IdlObject obj)
expr
- the IDL expressionpublic java.lang.String translate_to_union_case_expression(IdlUnionMember disc, java.lang.String expr)
expr
- the IDL expressionpublic void translate_type(IdlObject obj, java.io.PrintWriter output)
obj
- the object to translateoutput
- the write accesspublic void translate_parameter(IdlObject obj, java.io.PrintWriter output, int attr)
obj
- param object to translateoutput
- write accessattr
- parameter attributepublic int recursion(IdlObject obj)
obj
- object to testpublic void translate_typecode(IdlObject obj, java.io.PrintWriter output)
obj
- object to translateoutput
- write accesspublic void translate_any_insert(IdlObject obj, java.io.PrintWriter output, java.lang.String aname, java.lang.String tname)
obj
- object to insertoutput
- write accessaname
- any type nametname
- type name to insertpublic boolean isTruncatable(IdlObject obj)
public void printConcreteTypeCode(IdlObject obj, java.io.PrintWriter output)
public void translate_new_typecode(IdlObject obj, java.io.PrintWriter output)
obj
- the typecodeoutput
- write accesspublic java.lang.String get_array_name(IdlObject obj)
public void translate_marshalling_member(IdlObject obj, java.io.PrintWriter output, java.lang.String outname, java.lang.String tname, java.lang.String space)
obj
- member to encodeoutput
- write accessoutname
- outputstream nametname
- data type namespace
- indent spacepublic void translate_unmarshalling_member(IdlObject obj, java.io.PrintWriter output, java.lang.String inname, java.lang.String tname, java.lang.String space)
obj
- the member to encodeoutput
- write accessinname
- inputstream nametname
- data type namespace
- indent spacepublic void translate_marshalling_data(IdlObject obj, java.io.PrintWriter output, java.lang.String outname, java.lang.String tname)
obj
- the member to encodeoutput
- write accessoutname
- outputstream nametname
- data type namepublic void translate_unmarshalling_data(IdlObject obj, java.io.PrintWriter output, java.lang.String inname)
obj
- the member to decodeoutput
- write accessinname
- inputstream namepublic void translate_marshalling(IdlObject obj, java.io.PrintWriter output, java.lang.String outname, java.lang.String tname)
obj
- the data type to encodeoutput
- write accessoutname
- outputstream nametname
- data type namepublic void translate_unmarshalling(IdlObject obj, java.io.PrintWriter output, java.lang.String inname)
obj
- the data type to decodeoutput
- write accessinname
- inputstream namepublic void translate_constant(IdlObject obj, java.io.File writeInto, java.io.PrintWriter print)
obj
- the constant to translatewriteInto
- the directory where the constant must be definedpublic boolean isAbstractBaseInterface(IdlObject obj)
public void write_helper(IdlObject obj, java.io.File writeInto)
obj
- the object to translatewriteInto
- the directory where the object must be definedpublic void write_holder(IdlObject obj, java.io.File writeInto)
obj
- the object to translatewriteInto
- the directory where the object must be definedpublic void translate_enum(IdlObject obj, java.io.File writeInto)
obj
- the enum to be translatedwriteInto
- the directory where the enum must be definedpublic void translate_struct(IdlObject obj, java.io.File writeInto)
obj
- le module to be translatedwriteInto
- the directory where the structure must be definedpublic java.lang.String find_default_value(IdlObject obj)
obj
- the unionpublic void translate_union(IdlObject obj, java.io.File writeInto)
obj
- the union to translatewriteInto
- the directory where the union must be definedpublic void translate_typedef(IdlObject obj, java.io.File writeInto)
obj
- the typedef to translatewriteInto
- the directory where the typedef must be definedpublic void translate_exception(IdlObject obj, java.io.File writeInto)
obj
- exception to translatewriteInto
- the directory where the exception must be definedpublic void translate_attribute(IdlObject obj, java.io.PrintWriter output)
obj
- attribute to translateoutput
- write accesspublic void translate_user_attribute(IdlObject obj, java.io.PrintWriter output)
obj
- attribute to translateoutput
- write accesspublic void translate_attribute_tie(IdlObject obj, java.io.PrintWriter output)
obj
- attribute to translateoutput
- write accesspublic void translate_attribute_stub(IdlObject obj, java.io.PrintWriter output)
obj
- attribute to translateoutput
- write accesspublic void translate_attribute_stub_stream(IdlObject obj, java.io.PrintWriter output)
obj
- attribute to translateoutput
- write accesspublic void translate_read_attribute_skel(IdlObject obj, java.io.PrintWriter output)
obj
- attribute to translateoutput
- write accesspublic void translate_read_attribute_skel_stream(IdlObject obj, java.io.PrintWriter output)
obj
- attribute to translateoutput
- write accesspublic void translate_write_attribute_skel(IdlObject obj, java.io.PrintWriter output)
obj
- attribute to translateoutput
- write accesspublic void translate_write_attribute_skel_stream(IdlObject obj, java.io.PrintWriter output)
obj
- attribute to translateoutput
- write accesspublic IdlContext getContext(IdlObject obj)
obj
- the operationpublic void translate_operation(IdlObject obj, java.io.PrintWriter output)
obj
- operation to translateoutput
- write accesspublic void translate_user_operation(IdlObject obj, java.io.PrintWriter output)
obj
- operation to translateoutput
- write accesspublic void translate_operation_tie(IdlObject obj, java.io.PrintWriter output)
obj
- operation to translateoutput
- write accesspublic void translate_operation_skel(IdlObject obj, java.io.PrintWriter output)
obj
- operation to translateoutput
- write accesspublic void translate_operation_skel_stream(IdlObject obj, java.io.PrintWriter output)
obj
- operation to translateoutput
- write accesspublic void translate_operation_stub(IdlObject obj, java.io.PrintWriter output)
obj
- operation to translateoutput
- write accesspublic void translate_operation_stub_stream(IdlObject obj, java.io.PrintWriter output)
obj
- operation to translateoutput
- write accesspublic void translate_interface_operations(IdlObject obj, java.io.File writeInto)
obj
- interface from which operations must be translatedwriteInto
- the directory where the interface must be definedpublic boolean isEmptyInterface(IdlObject obj)
public boolean isEmptyValue(IdlObject obj)
public boolean isEmpty(IdlObject obj)
public void translate_interface(IdlObject obj, java.io.File writeInto)
obj
- interface to translatewriteInto
- the directory where the interface must be definedpublic void translate_user_interface(IdlObject obj, java.io.File writeInto)
obj
- interface to translatewriteInto
- the directory where the interface must be definedpublic boolean isInto(java.util.List opList, IdlObject obj)
opList
- operations and attributes listop
- the operation or attributepublic void translate_interface_stub(IdlObject obj, java.io.File writeInto)
obj
- the interface to translatewriteInto
- the directory where the interface must be definedpublic void translate_interface_skel(IdlObject obj, java.io.File writeInto)
obj
- the interface to translatewriteInto
- the directory where the interface must be definedpublic void translate_interface_tie(IdlObject obj, java.io.File writeInto)
obj
- the interface to translatewriteInto
- the directory where the interface must be definedpublic void translate_module(IdlObject obj, java.io.File writeInto, int translateType)
obj
- the module to translatewriteInto
- the directory where the module must be definedpublic void translate_user_module(IdlObject obj, java.io.File writeInto)
obj
- the module to translatewriteInto
- the directory where the module must be definedpublic void translate_state_member(IdlObject obj, java.io.PrintWriter output)
public void translate_value_type(IdlObject obj, java.io.File writeInto)
obj
- la value type to translatewriteInto
- the directory where the module must be definedpublic void writeDefaultValueFactory(IdlValue obj, java.io.File writeInto)
public void writeDefaultValueImpl(IdlValue obj, java.io.File writeInto)
public void writeDefaultMethods(java.io.PrintWriter output, IdlObject obj, java.util.Set ids)
public void writeDefaultMethodsForValueTypes(java.io.PrintWriter output, java.util.List list, java.util.Set ids)
public void writeDefaultMethodsForInterfaces(java.io.PrintWriter output, java.util.List list, java.util.Set ids)
public void writeDefaultAttribute(java.io.PrintWriter output, IdlAttribute obj)
public void writeDefaultOperation(java.io.PrintWriter output, IdlOp obj)
public void translate_value_box(IdlObject obj, java.io.File writeInto)
obj
- the value box to translatewriteInto
- the directory where the module must be definedpublic void translate_native(IdlObject obj, java.io.File writeInto)
obj
- the module to translatewriteInto
- the directory where the module must be definedpublic void translate_object_content(IdlObject obj, java.io.File writeInto, int translateType)
public void translate_object(IdlObject obj, java.io.File writeInto, int translateType)
obj
- the object to translatewriteInto
- the write accesstranslateType
- the translation type (0=data, 1=stub, 2=skeleton)public void translate_user_object(IdlObject obj, java.io.File writeInto)
obj
- the object to translatewriteInto
- the write accesspublic void translateData(IdlObject obj, java.lang.String packageName)
obj
- The compilation graph rootpackageName
- The directory where the definitions are addedpublic void translateTIE(IdlObject obj, java.lang.String packageName)
obj
- The compilation graph rootpackageName
- The directory where the definitions are addedpublic void translateUser(IdlObject obj, java.lang.String packageName)
obj
- The compilation graph rootpackageName
- The directory where the definitions are addedpublic void translateStub(IdlObject obj, java.lang.String packageName)
obj
- The compilation graph rootpackageName
- The directory where the definitions are addedpublic void translateSkeleton(IdlObject obj, java.lang.String packageName)
obj
- The compilation graph rootpackageName
- The directory where the definitions are added
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |