+ /**
+ * Starts the container. After the container is started, the container becomes sealed
+ * meaning that no further components, required or provided interfaces may be added.
+ * @return Scope.
+ */
+ public Scope start() {
+ checkSealed();
+ validate();
+ Scope scope = super.start(new DefaultScope(new ProvidedInterface[0]));
+ seal();
+ return scope;
+ }
+
+ /**
+ * Seal the container, meaning that no further components or interfaces may be added.
+ */
+ public void seal() {
+ _sealed = true;
+ }
+
+ /**
+ * Checks if the container is sealed.
+ * @return True iff the container is sealed.
+ */
+ public boolean isSealed() {
+ return _sealed;