summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAudrius Meskauskas <audriusa@Bioinformatics.org>2006-07-10 08:24:45 +0000
committerAudrius Meskauskas <audriusa@Bioinformatics.org>2006-07-10 08:24:45 +0000
commit69bc0cc80cc62a9c38f3e78efa1e73074699ed1b (patch)
treee6b9e1bfde89ef6e8cbdb29b74b8d0a4fd5f9a73 /examples
parentc45340c2ccf6c1f9c4ca96bcfdbeabcfd652e2a6 (diff)
downloadclasspath-69bc0cc80cc62a9c38f3e78efa1e73074699ed1b.tar.gz
2006-07-10 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/ communication/StructureToPassHelper.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/ communication/StructureToReturnHelper.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/ communication/TreeNodeHelper.java, examples/gnu/classpath/examples/CORBA/SimpleCommunication/ communication/WeThrowThisExceptionHelper.java, gnu/CORBA/ForwardRequestHelper.java, org/omg/CORBA/CompletionStatusHelper.java, org/omg/CORBA/CurrentHelper.java, org/omg/CORBA/DefinitionKindHelper.java, org/omg/CORBA/IDLTypeHelper.java, org/omg/CORBA/NameValuePairHelper.java, org/omg/CORBA/ObjectHelper.java, org/omg/CORBA/ParameterModeHelper.java, org/omg/CORBA/PolicyErrorCodeHelper.java, org/omg/CORBA/PolicyErrorHelper.java, org/omg/CORBA/PolicyHelper.java, org/omg/CORBA/PolicyListHelper.java, org/omg/CORBA/PolicyTypeHelper.java, org/omg/CORBA/ServiceDetailHelper.java, org/omg/CORBA/ServiceInformationHelper.java, org/omg/CORBA/SetOverrideTypeHelper.java, org/omg/CORBA/StringValueHelper.java, org/omg/CORBA/UnionMemberHelper.java, org/omg/CORBA/UnknownUserExceptionHelper.java, org/omg/CORBA/VisibilityHelper.java, org/omg/CORBA/WStringValueHelper.java, org/omg/CORBA/WrongTransactionHelper.java, org/omg/CosNaming/BindingHelper.java, org/omg/CosNaming/BindingIteratorHelper.java, org/omg/CosNaming/BindingListHelper.java, org/omg/CosNaming/BindingTypeHelper.java, org/omg/CosNaming/NameComponentHelper.java, org/omg/CosNaming/NameHelper.java, org/omg/CosNaming/NamingContextExtHelper.java, org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java, org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java, org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java, org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java, org/omg/CosNaming/NamingContextHelper.java, org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java, org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java, org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java, org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java, org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java, org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java, org/omg/DynamicAny/AnySeqHelper.java, org/omg/DynamicAny/DynAnyFactoryHelper.java, org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java, org/omg/DynamicAny/DynAnyHelper.java, org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java, org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java, org/omg/DynamicAny/DynAnySeqHelper.java, org/omg/DynamicAny/DynArrayHelper.java, org/omg/DynamicAny/DynEnumHelper.java, org/omg/DynamicAny/DynFixedHelper.java, org/omg/DynamicAny/DynSequenceHelper.java, org/omg/DynamicAny/DynStructHelper.java, org/omg/DynamicAny/DynUnionHelper.java, org/omg/DynamicAny/DynValueHelper.java, org/omg/DynamicAny/NameDynAnyPairHelper.java, org/omg/DynamicAny/NameDynAnyPairSeqHelper.java, org/omg/DynamicAny/NameValuePairHelper.java, org/omg/DynamicAny/NameValuePairSeqHelper.java, org/omg/IOP/CodecFactoryHelper.java, org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java, org/omg/IOP/CodecPackage/FormatMismatchHelper.java, org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java, org/omg/IOP/CodecPackage/TypeMismatchHelper.java, org/omg/IOP/ComponentIdHelper.java, org/omg/IOP/IORHelper.java, org/omg/IOP/MultipleComponentProfileHelper.java, org/omg/IOP/ProfileIdHelper.java, org/omg/IOP/ServiceContextHelper.java, org/omg/IOP/ServiceContextListHelper.java, org/omg/IOP/ServiceIdHelper.java, org/omg/IOP/TaggedComponentHelper.java, org/omg/IOP/TaggedProfileHelper.java, org/omg/PortableInterceptor/AdapterManagerIdHelper.java, org/omg/PortableInterceptor/AdapterNameHelper.java, org/omg/PortableInterceptor/AdapterStateHelper.java, org/omg/PortableInterceptor/CurrentHelper.java, org/omg/PortableInterceptor/ForwardRequestHelper.java, org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java, org/omg/PortableInterceptor/InvalidSlotHelper.java, org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java, org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java, org/omg/PortableInterceptor/ObjectReferenceFactoryHelper.java, org/omg/PortableInterceptor/ObjectReferenceTemplateHelper.java, org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHelper.java, org/omg/PortableServer/CurrentHelper.java, org/omg/PortableServer/CurrentPackage/NoContextHelper.java, org/omg/PortableServer/ForwardRequestHelper.java, org/omg/PortableServer/POAHelper.java, org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java, org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java, org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java, org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java, org/omg/PortableServer/POAPackage/NoServantHelper.java, org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java, org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java, org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java, org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java, org/omg/PortableServer/POAPackage/WrongAdapterHelper.java, org/omg/PortableServer/POAPackage/WrongPolicyHelper.java, org/omg/PortableServer/ServantActivatorHelper.java, org/omg/PortableServer/ServantLocatorHelper.java: Remove the typecode caching and always use OrbRestricted.Singleton.
Diffstat (limited to 'examples')
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHelper.java15
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHelper.java25
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHelper.java11
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java6
4 files changed, 34 insertions, 23 deletions
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHelper.java
index c41ebe237..652ee53cc 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPassHelper.java
@@ -38,6 +38,8 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
+import gnu.CORBA.OrbRestricted;
+
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TypeCode;
@@ -81,13 +83,14 @@ public abstract class StructureToPassHelper
*/
public static synchronized TypeCode type()
{
- StructMember[] members = new StructMember[ 2 ];
+ StructMember[] members = new StructMember[2];
TypeCode member = null;
- member = ORB.init().create_string_tc(0);
- members [ 0 ] = new StructMember("a", member, null);
- member = ORB.init().create_string_tc(0);
- members [ 1 ] = new StructMember("b", member, null);
- return ORB.init().create_struct_tc(StructureToPassHelper.id(), "StructureToPass", members);
+ member = OrbRestricted.Singleton.create_string_tc(0);
+ members[0] = new StructMember("a", member, null);
+ member = OrbRestricted.Singleton.create_string_tc(0);
+ members[1] = new StructMember("b", member, null);
+ return OrbRestricted.Singleton.create_struct_tc(StructureToPassHelper.id(),
+ "StructureToPass", members);
}
/**
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHelper.java
index 42fb7a574..2ac03a895 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturnHelper.java
@@ -37,6 +37,8 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
+import gnu.CORBA.OrbRestricted;
+
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
@@ -86,17 +88,18 @@ public abstract class StructureToReturnHelper
*/
public static synchronized TypeCode type()
{
- StructMember[] members = new StructMember[ 3 ];
- TypeCode member = ORB.init().get_primitive_tc(TCKind.tk_long);
- members [ 0 ] = new StructMember("n", member, null);
- member = ORB.init().create_string_tc(0);
- members [ 1 ] = new StructMember("c", member, null);
- member = ORB.init().get_primitive_tc(TCKind.tk_long);
- member = ORB.init().create_array_tc(3, member);
- members [ 2 ] = new StructMember("arra", member, null);
- return ORB.init().create_struct_tc(StructureToReturnHelper.id(), "StructureToReturn",
- members
- );
+ StructMember[] members = new StructMember[3];
+ TypeCode member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
+ members[0] = new StructMember("n", member, null);
+ member = OrbRestricted.Singleton.create_string_tc(0);
+ members[1] = new StructMember("c", member, null);
+ member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
+ member = OrbRestricted.Singleton.create_array_tc(3, member);
+ members[2] = new StructMember("arra", member, null);
+ return OrbRestricted.Singleton.create_struct_tc(
+ StructureToReturnHelper.id(),
+ "StructureToReturn",
+ members);
}
/**
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHelper.java
index f111d0eac..ccf792da8 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNodeHelper.java
@@ -38,6 +38,9 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
+
+import gnu.CORBA.OrbRestricted;
+
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
@@ -128,18 +131,18 @@ public abstract class TreeNodeHelper
// To avoid the infinite recursion loop, the
// recursive reference is handled in specific way.
if (active)
- return ORB.init().create_recursive_tc(_id);
+ return OrbRestricted.Singleton.create_recursive_tc(_id);
active = true;
// List all memebers of the TreeNode structure.
StructMember[] members = new StructMember[ 2 ];
TypeCode memberType;
- memberType = ORB.init().create_string_tc(0);
+ memberType = OrbRestricted.Singleton.create_string_tc(0);
members [ 0 ] = new StructMember("name", memberType, null);
- memberType = ORB.init().create_recursive_tc("");
+ memberType = OrbRestricted.Singleton.create_recursive_tc("");
members [ 1 ] = new StructMember("children", memberType, null);
typeCode =
- ORB.init().create_struct_tc(TreeNodeHelper.id(), "TreeNode", members);
+ OrbRestricted.Singleton.create_struct_tc(TreeNodeHelper.id(), "TreeNode", members);
active = false;
}
}
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java
index 4d5eee74b..6ad13a9bb 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java
@@ -38,6 +38,8 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
+import gnu.CORBA.OrbRestricted;
+
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
@@ -96,9 +98,9 @@ public abstract class WeThrowThisExceptionHelper
{
StructMember[] members = new StructMember[ 1 ];
TypeCode member = null;
- member = ORB.init().get_primitive_tc(TCKind.tk_long);
+ member = OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_long);
members [ 0 ] = new StructMember("ourField", member, null);
- return ORB.init().create_struct_tc(WeThrowThisExceptionHelper.id(),
+ return OrbRestricted.Singleton.create_struct_tc(WeThrowThisExceptionHelper.id(),
"WeThrowThisException", members
);
}