org.metawidget.iface.Immutable Maven / Gradle / Ivy
// Metawidget
//
// This file is dual licensed under both the LGPL
// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
// (http://www.eclipse.org/org/documents/epl-v10.php). As a
// recipient of Metawidget, you may choose to receive it under either
// the LGPL or the EPL.
//
// Commercial licenses are also available. See http://metawidget.org
// for details.
package org.metawidget.iface;
/**
* Interface to indicate a class (ie. an Inspector
, a Layout
etc) should
* be considered immutable.
*
* Immutable classes should:
*
* - not provide any setter methods or mutators
* - make defensive copies for any getter methods
* - mark all fields final and private
*
*
* Note: this interface is not an annotation because we want it to be automatically inherited when
* placed on interfaces (such as Inspector
). Even the Inherited
annotation
* does not propagate from interfaces.
*
* This is an internal API and is subject to change. Clients should use one of its
* subinterfaces (ie. Inspector
, Layout
etc) instead.
*
* @author Richard Kennard
*/
public interface Immutable {
// Just a marker interface
}