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