diff options
author | Matthew Newhook <matthew@zeroc.com> | 2002-03-07 20:27:35 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2002-03-07 20:27:35 +0000 |
commit | 5458a493a16ac9ee761cf350108f608600a56bce (patch) | |
tree | 234ed248103343b390caa4a74ebc2f6b4d83e07f /java/test/Freeze/complex/Complex/ObjectFactoryI.java | |
parent | mistakenly used XML encoding (diff) | |
download | ice-5458a493a16ac9ee761cf350108f608600a56bce.tar.bz2 ice-5458a493a16ac9ee761cf350108f608600a56bce.tar.xz ice-5458a493a16ac9ee761cf350108f608600a56bce.zip |
Initial version of Freeze for Java.
Diffstat (limited to 'java/test/Freeze/complex/Complex/ObjectFactoryI.java')
-rw-r--r-- | java/test/Freeze/complex/Complex/ObjectFactoryI.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/java/test/Freeze/complex/Complex/ObjectFactoryI.java b/java/test/Freeze/complex/Complex/ObjectFactoryI.java new file mode 100644 index 00000000000..12231421827 --- /dev/null +++ b/java/test/Freeze/complex/Complex/ObjectFactoryI.java @@ -0,0 +1,41 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +package Complex; + +public class ObjectFactoryI implements Ice.ObjectFactory +{ + public Ice.Object + create(String type) + { + if (type.equals("::Complex::MultiplyNode")) + { + return new MultiplyNodeI(); + } + if (type.equals("::Complex::AddNode")) + { + return new AddNodeI(); + } + if (type.equals("::Complex::NumberNode")) + { + return new NumberNodeI(); + } + + System.err.println( "create: " + type); + assert(false); + return null; + } + + public void + destroy() + { + // Nothing to do + } +} |