• Post Reply Bookmark Topic Watch Topic
  • New Topic

class accessibility issue  RSS feed

 
ravin kacha
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Everyone,

I have a very strange problem infront of me.
I have developed an enhancement in applet for my client on an existing applet application.
I don't have code for the existing application, only having a jar for that.
Now from the existing code i am using a base class called TaskClient which has a default access.
Problem starts from here, this class is in com.matrixone.applet package and my new classes i have put in the same package.
Now client wants that i must use their package say 'com.holset.apps.cdm.applet' for newly developed classes.
If I do this i'll not be able to access the base class and my whole functionality will fail.

can you suggest any workarround for this.

thanks in advance
Ravin Kacha.
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If they have put a package-private class in a package it is probably because they didn't intend it to be inherited from.
 
ravin kacha
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ohhh yeah...
I know that, but is there any work arround for this problem??
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Through reflection you may be able to perform some nasty tricks. However, since you can't import the class either you must call all methods using reflection. That's going to be quite a performance impact.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!