Understanding class access
- From: André Wagner <andre.nho@xxxxxxxxx>
- Date: 31 May 2007 09:33:25 -0700
Hello,
let's say I'm writing a extension organized in packages such as:
mycompany.mypackage.MyClass
mycompany.mypackage.subpackage.MySubClass
The people who are going to use my extension will extend MyClass. So I
declare it to be public.
But I don't want people to be able to access MySubClass, so I can't
declare as public. But I want MyClass to be able to access MySubClass,
and if I don't declare MySubClass to be public, the compiler complains
that MySubClass is in a different package and must be public.
(I hope I'm being clear here :-)
Is there anyway that I can access MySubClass from MyClass, but make
MySubClass invisible for packages outside mycompany.mypackage?
Thank you in advance,
André
.
- Follow-Ups:
- Re: Understanding class access
- From: angrybaldguy
- Re: Understanding class access
- From: Chris Smith
- Re: Understanding class access
- Prev by Date: Re: Remote access to Tomcat web server
- Next by Date: Re: Understanding class access
- Previous by thread: Struts Iframe Exception
- Next by thread: Re: Understanding class access
- Index(es):
Relevant Pages
|