org.apache.commons.attributes
Interface Sealable
- 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:
- Its constructor is called with all non-named parameters in the attribute declaration.
- 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.
void | seal() - Called to indicate that construction and initialization of this attribute instance
is completed, and that the attribute instance should become read-only.
|
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.