org.apache.commons.attributes
public class DefaultSealable extends java.lang.Object implements Sealable
Sealable
interface. Subclasses should call
checkSealed()
before setting any bean properties.Modifier and Type | Field and Description |
---|---|
private boolean |
sealed
Boolean flag indicating whether the
seal() method
has been called. |
Constructor and Description |
---|
DefaultSealable()
Default ctor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkSealed()
Checks if the
seal() method has been called and throws a
IllegalStateException if it has. |
void |
seal()
Seals this attribute.
|
private volatile boolean sealed
seal()
method
has been called.protected void checkSealed() throws java.lang.IllegalStateException
seal()
method has been called and throws a
IllegalStateException
if it has.java.lang.IllegalStateException
- if this attribute has been sealed.public void seal()
checkSealed()
method will result in an
IllegalStateException
being thrown.