org.apache.commons.attributes
Class DefaultSealable
java.lang.Object
|
+--org.apache.commons.attributes.DefaultSealable
- All Implemented Interfaces:
- Sealable
- public class DefaultSealable
- extends Object
- implements Sealable
Implementation of the Sealable
interface. Subclasses should call
checkSealed()
before setting any bean properties.
Method Summary |
protected void |
checkSealed()
Checks if the seal() method has been called and throws a
IllegalStateException if it has. |
void |
seal()
Seals this attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSealable
public DefaultSealable()
checkSealed
protected void checkSealed()
throws IllegalStateException
- Checks if the
seal()
method has been called and throws a
IllegalStateException
if it has.
- Throws:
IllegalStateException
- if this attribute has been sealed.
seal
public void seal()
- Seals this attribute. Any future calls to the
checkSealed()
method will result in an
IllegalStateException
being thrown.
- Specified by:
seal
in interface Sealable
Copyright © The Apache Software Foundation. All Rights Reserved.