diff options
Diffstat (limited to 'java/demo/Ice/value/ObjectFactory.java')
-rw-r--r-- | java/demo/Ice/value/ObjectFactory.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/java/demo/Ice/value/ObjectFactory.java b/java/demo/Ice/value/ObjectFactory.java new file mode 100644 index 00000000000..f00babd0cde --- /dev/null +++ b/java/demo/Ice/value/ObjectFactory.java @@ -0,0 +1,35 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +class ObjectFactory implements Ice.ObjectFactory +{ + public Ice.Object + create(String type) + { + if (type.equals("::Printer")) + { + return new PrinterI(); + } + + if (type.equals("::DerivedPrinter")) + { + return new DerivedPrinterI(); + } + + assert(false); + return null; + } + + public void + destroy() + { + // Nothing to do + } +} |