org.apache.commons.attributes
Interface Sealable

All Known Implementing Classes:
DefaultSealable

public interface Sealable

Marks an attribute class as being sealable. When an instance of an attribute class is created it goes through the following phases:

  1. Its constructor is called with all non-named parameters in the attribute declaration.
  2. Its setters are called according to the named parameters in the declaration.
This alone poses a security risk, as a client can call setters on an attribute as well, and thus make class attributes mutable. In order to notify the attribute class that construction and initialization is completed, the attribute runtime system will test if it implements Sealable, and of so, invoke seal() on the attribute instance.

Since:
2.1
See Also:
DefaultSealable

Method Summary
 void seal()
          Called to indicate that construction and initialization of this attribute instance is completed, and that the attribute instance should become read-only.
 

Method Detail

seal

public void seal()
Called to indicate that construction and initialization of this attribute instance is completed, and that the attribute instance should become read-only.

Since:
2.1


Copyright © The Apache Software Foundation. All Rights Reserved.