Thx for the explanation - that's exactly what I meant asking why it is
protected?

I would like to have the interface public - because a marker is rather
useless if It cannot be referenced. I wanted to use it in an interface
as argument but I had to use the class instead - which I think is not
ok when I just want to specify the expected interface.

I think it is ok to offer a class to extend for easy living... but
'hiding' the interface and forcing to extend a class is not ok.

Is it ok if I change it to public?

2008/8/5 Lukas Lang <[EMAIL PROTECTED]>:
> Hello folks,
>
> according to Sun's guide to classes and objects [1],
> classes or interfaces, having no keyword as "public",
> "private" or "protected" prefixed offer default visibility.
>
> As the guide propagates, an interface providing default visibility
> is not visible from other packages, which would represent a problem for one,
> who wants to derive from the Nature interface in various other packages.
>
> The main intention to do so, was that we offered a base class (BaseNature)
> to do easy property handling (prefixing) and a "health check" in the
> constructor,
> which is visible to all packages.
>
> You can see the Nature interface itself as a kind of marker
> to have a common superclass.
>
> I think, I got some documentation (UML) on the Nature architecture.
> So if you want, I can provide this to you.
>
> Regards,
> Lukas
>
> [1] http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
>
> Werner Guttmann schrieb:
>>
>> Joachim,
>>
>> sorry, but the keyword 'protected' is not used in the interface
>> declaration anywhere. As such, it definitely is not protected.
>>
>> Let me ask you something else: what problem are you having (if at all)
>> with the way the interface is declared ?
>>
>> Regards
>> Werner
>>
>> Joachim Grüneis wrote:
>>>
>>> When an interface is declared as:
>>>
>>> /*
>>>  * Copyright 2008 Lukas Lang
>>>  *
>>>  * Licensed under the Apache License, Version 2.0 (the "License");
>>>  * you may not use this file except in compliance with the License.
>>>  * You may obtain a copy of the License at
>>>  *
>>>  * http://www.apache.org/licenses/LICENSE-2.0
>>>  *
>>>  * Unless required by applicable law or agreed to in writing, software
>>>  * distributed under the License is distributed on an "AS IS" BASIS,
>>>  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>>  * See the License for the specific language governing permissions and
>>>  * limitations under the License.
>>>  *
>>>  */
>>> package org.castor.core.nature;
>>>
>>> /**
>>>  * A Nature defines a perception of any arbitrary Class.
>>>  *
>>>  * @author Lukas Lang
>>>  * @since 1.2.1
>>>  *
>>>  */
>>> interface Nature {
>>>    /**
>>>     * Returns the fully qualified name of the Nature.
>>>     * @return qualified name of the nature.
>>>     */
>>>    String getId();
>>> }
>>>
>>> it is protected.
>>>
>>> 2008/7/31 Werner Guttmann <[EMAIL PROTECTED]>:
>>>>
>>>> Joachim,
>>>>
>>>> in what sense 'protected' ?
>>>>
>>>> Werner
>>>>
>>>> Joachim Grüneis wrote:
>>>>>
>>>>> Why is interface org.castor.core.nature.Nature protected?
>>>>>
>>>>> Regards
>>>>> Joachim
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>>    http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>   http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to