× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I had created a class to combine the two classes.  I did not want to do
this, because it would lead to maintenance nightmares (and this is not a
true OO concept :)).  When I received the first email about using inner
classes, I immediately began work with the inner classes.  I think the inner
class idea is the best solution so far...

Thanks everyone for your ideas....  as a side note, I put the same question
out on the JavaWorld message forum and did not receive any responses...seems
like we have a great group of guys here on the java-400 list!

Mike

----- Original Message -----
From: "Kendall Coolidge" <Kendall.Coolidge@CCBAI.COM>
To: <java400-l@midrange.com>
Sent: Thursday, June 27, 2002 3:34 PM
Subject: RE: Extending more than one base class....


Mike,

This might be a situation where you should look into using inner classes. As
I understand it, you can have an outer "enclosing" class and declare two
"inner" classes.  Each of the inner classes can extend a different abstract
class, such as the commercial classes you are using.  I'm not an expert at
this, but I believe this (combined with interfaces) is how Java accomplishes
multiple inheritance.

Good luck
Ken

-----Original Message-----
From: Mike Silvers [mailto:msilvers@HBS-INC.COM]
Sent: Thursday, June 27, 2002 2:02 PM
To: java400-l@midrange.com
Subject: Re: Extending more than one base class....


Lets try that again...it's not going to work.  Both of the base classes are
abstract and need to be extended in order for variables to be accessed.  Any
other ideas?

Mike

----- Original Message -----
From: "Mike Silvers" <msilvers@hbs-inc.com>
To: <java400-l@midrange.com>
Sent: Thursday, June 27, 2002 1:23 PM
Subject: Re: Extending more than one base class....


> Bruce,
>
> Great Idea.... I think it will work in this instance.
>
> Thanks!
>
> Mike
>
> ----- Original Message -----
> From: "Bruce Jin" <JIN007M@hotmail.com>
> To: <java400-l@midrange.com>
> Sent: Thursday, June 27, 2002 3:10 PM
> Subject: Re: Extending more than one base class....
>
>
> > You may have to use contain instead of inheritance. The 2 classes from 2
> > vendors may have variables/methods having the same names. Have your
class
> > contain the other 2 classes will allow you to access variables/methods
in
> > each class correctly. Say your class is M and the vendor's classes are
C1
> > and C2
> >
> > class M {
> >
> > void method() {
> >
> > C1 obj1 = new C1();
> > C2 obj2 = new C2();
> >
> > obj1.xxxx()
> > obj2.xxxx();
> >
> >  }
> >
> > ----- Original Message -----
> > From: "Mike Silvers" <msilvers@HBS-INC.COM>
> > To: <java400-l@midrange.com>
> > Sent: Thursday, June 27, 2002 7:15 AM
> > Subject: Extending more than one base class....
> >
> >
> > > All,
> > >
> > > I need to extend more than one base class for a specific class.  Both
> > > classes are from commercial packages, so I do not have the source for
> > them.
> > > I can not use an interface for either of them.  Obviously, I can't
> extend
> > > both of the classes for this class.  Does anyone have any ideas to
work
> > > around this Java restriction?
> > >
> > > Thanks
> > >
> > > Mike
> > >
> > > ================================
> > > Mike Silvers
> > > AS/400 Senior Programmer/Analyst
> > > AS/400 IBM Certified RPG IV Developer
> > > AS/400 IBM Certified Solutions Expert
> > > Hainey Business Systems
> > > 8 E. Canal St
> > > Dover, PA 17315
> > > Branch Office:  (410) 397-8739
> > > Phone:  (800) 932-3380 ext. 237
> > > Fax:  (717) 292-9474
> > > Web: http://www.hbs-inc.com
> > > ________________________________
> > > Providing E-Commerce, EDI, AS/400
> > > Development, Java Development,
> > > and related services nationwide.
> > > ================================
> > >
> > >
> > > _______________________________________________
> > > This is the Java Programming on and around the iSeries / AS400
> (JAVA400-L)
> > mailing list
> > > To post a message email: JAVA400-L@midrange.com
> > > To subscribe, unsubscribe, or change list options,
> > > visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
> > > or email: JAVA400-L-request@midrange.com
> > > Before posting, please take a moment to review the archives
> > > at http://archive.midrange.com/java400-l.
> > >
> > >
> > _______________________________________________
> > This is the Java Programming on and around the iSeries / AS400
(JAVA400-L)
> mailing list
> > To post a message email: JAVA400-L@midrange.com
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
> > or email: JAVA400-L-request@midrange.com
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/java400-l.
> >
> >
>
>
> _______________________________________________
> This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
> To post a message email: JAVA400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
> or email: JAVA400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.
>
>


_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.