All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.refcodes.decoupling.DependencyException Maven / Gradle / Ivy

Go to download

Artifact for breaking up dependencies between components or modules of a software system (dependency injection and inversion of control).

There is a newer version: 3.3.8
Show newest version
// /////////////////////////////////////////////////////////////////////////////
// REFCODES.ORG
// =============================================================================
// This code is copyright (c) by Siegfried Steiner, Munich, Germany and licensed
// under the following (see "http://en.wikipedia.org/wiki/Multi-licensing")
// licenses:
// =============================================================================
// GNU General Public License, v3.0 ("http://www.gnu.org/licenses/gpl-3.0.html")
// together with the GPL linking exception applied; as being applied by the GNU
// Classpath ("http://www.gnu.org/software/classpath/license.html")
// =============================================================================
// Apache License, v2.0 ("http://www.apache.org/licenses/TEXT-2.0")
// =============================================================================
// Please contact the copyright holding author(s) of the software artifacts in
// question for licensing issues not being covered by the above listed licenses,
// also regarding commercial licensing models or regarding the compatibility
// with other open source licenses.
// /////////////////////////////////////////////////////////////////////////////

package org.refcodes.decoupling;

import org.refcodes.exception.AbstractException;
import org.refcodes.mixin.AliasAccessor;

/**
 * The {@link DependencyException} is the base checked exception for the
 * refcodes-decoupling package.
 */
@SuppressWarnings("rawtypes")
public abstract class DependencyException extends AbstractException implements DependencyAccessor {

	private static final long serialVersionUID = 1L;

	// /////////////////////////////////////////////////////////////////////////
	// VARIABLES:
	// /////////////////////////////////////////////////////////////////////////

	private Dependency _dependency;

	// /////////////////////////////////////////////////////////////////////////
	// CONSTRUCTORS:
	// /////////////////////////////////////////////////////////////////////////

	/**
	 * Instantiates a new {@link DependencyException}.
	 *
	 * @param aDependency The related {@link Dependency}.
	 * @param aMessage The aMessage describing this exception.
	 * @param aErrorCode The error code identifying this exception.
	 */
	public DependencyException( Dependency aDependency, String aMessage, String aErrorCode ) {
		super( aMessage, aErrorCode );
		_dependency = aDependency;
	}

	/**
	 * Instantiates a new {@link DependencyException}.
	 *
	 * @param aDependency The related {@link Dependency}.
	 * @param aMessage The aMessage describing this exception.
	 * @param aCause The {@link Throwable} ({@link Exception}) causing this
	 *        exception.
	 * @param aErrorCode The error code identifying this exception.
	 */
	public DependencyException( Dependency aDependency, String aMessage, Throwable aCause, String aErrorCode ) {
		super( aMessage, aCause, aErrorCode );
		_dependency = aDependency;
	}

	/**
	 * Instantiates a new {@link DependencyException}.
	 *
	 * @param aDependency The related {@link Dependency}.
	 * @param aMessage The aMessage describing this exception.
	 * @param aCause The {@link Throwable} ({@link Exception}) causing this
	 *        exception.
	 */
	public DependencyException( Dependency aDependency, String aMessage, Throwable aCause ) {
		super( aMessage, aCause );
		_dependency = aDependency;
	}

	/**
	 * Instantiates a new {@link DependencyException}.
	 *
	 * @param aDependency The related {@link Dependency}.
	 * @param aMessage The aMessage describing this exception.
	 */
	public DependencyException( Dependency aDependency, String aMessage ) {
		super( aMessage );
		_dependency = aDependency;
	}

	/**
	 * Instantiates a new {@link DependencyException}.
	 *
	 * @param aDependency The related {@link Dependency}.
	 * @param aCause The {@link Throwable} ({@link Exception}) causing this
	 *        exception.
	 * @param aErrorCode The error code identifying this exception.
	 */
	public DependencyException( Dependency aDependency, Throwable aCause, String aErrorCode ) {
		super( aCause, aErrorCode );
		_dependency = aDependency;
	}

	/**
	 * Instantiates a new {@link DependencyException}.
	 *
	 * @param aDependency The related {@link Dependency}.
	 * @param aCause The {@link Throwable} ({@link Exception}) causing this
	 *        exception.
	 */
	public DependencyException( Dependency aDependency, Throwable aCause ) {
		super( aCause );
		_dependency = aDependency;
	}

	// /////////////////////////////////////////////////////////////////////////
	// METHODS:
	// /////////////////////////////////////////////////////////////////////////

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Dependency getDependency() {
		return _dependency;
	}

	// /////////////////////////////////////////////////////////////////////////
	// INNER CLASSES:
	// /////////////////////////////////////////////////////////////////////////

	/**
	 * The {@link DependenciesException} is a {@link DependencyException}
	 * containing additional related dependency.
	 */
	public static abstract class DependenciesException extends DependencyException implements DependenciesAccessor {

		// /////////////////////////////////////////////////////////////////////
		// STATICS:
		// /////////////////////////////////////////////////////////////////////

		private static final long serialVersionUID = 1L;

		// /////////////////////////////////////////////////////////////////////
		// VARIABLES:
		// /////////////////////////////////////////////////////////////////////

		private Dependency[] _dependencies;

		// /////////////////////////////////////////////////////////////////////
		// CONSTRUCTORS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Instantiates a new {@link DependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public DependenciesException( Dependency aDependency, Dependency[] aDependencies, String aMessage, String aErrorCode ) {
			super( aDependency, aMessage, aErrorCode );
			_dependencies = aDependencies;
		}

		/**
		 * Instantiates a new {@link DependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public DependenciesException( Dependency aDependency, Dependency[] aDependencies, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aDependency, aMessage, aCause, aErrorCode );
			_dependencies = aDependencies;
		}

		/**
		 * Instantiates a new {@link DependenciesException}.
		 * 
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aCause the {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 */
		public DependenciesException( Dependency aDependency, Dependency[] aDependencies, String aMessage, Throwable aCause ) {
			super( aDependency, aMessage, aCause );
			_dependencies = aDependencies;
		}

		/**
		 * Instantiates a new {@link DependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 */
		public DependenciesException( Dependency aDependency, Dependency[] aDependencies, String aMessage ) {
			super( aDependency, aMessage );
			_dependencies = aDependencies;
		}

		/**
		 * Instantiates a new {@link DependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public DependenciesException( Dependency aDependency, Dependency[] aDependencies, Throwable aCause, String aErrorCode ) {
			super( aDependency, aCause, aErrorCode );
			_dependencies = aDependencies;
		}

		/**
		 * Instantiates a new {@link DependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 */
		public DependenciesException( Dependency aDependency, Dependency[] aDependencies, Throwable aCause ) {
			super( aDependency, aCause );
			_dependencies = aDependencies;
		}

		// /////////////////////////////////////////////////////////////////////
		// METHODS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Retrieves the {@link Dependency} declarations related to this
		 * exception.
		 * 
		 * @return The unsatisfied {@link Dependency} declarations
		 */
		@Override
		public Dependency[] getDependencies() {
			return _dependencies;
		}
	}

	/**
	 * The {@link DependencyClaimException} is a {@link DependencyException}
	 * containing an additional related {@link Claim} instance relative to
	 * associated {@link Claim} instances.
	 */
	public static abstract class DependencyClaimException extends DependencyException implements ClaimAccessor, ClaimsAccessor {

		// /////////////////////////////////////////////////////////////////////
		// STATICS:
		// /////////////////////////////////////////////////////////////////////

		private static final long serialVersionUID = 1L;

		// /////////////////////////////////////////////////////////////////////
		// VARIABLES:
		// /////////////////////////////////////////////////////////////////////

		private Claim[] _claims;
		private Claim _claim;

		// /////////////////////////////////////////////////////////////////////
		// CONSTRUCTORS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Instantiates a new {@link DependencyClaimException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aClaims the {@link Claim} instances related to this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public DependencyClaimException( Dependency aDependency, Claim aClaim, Claim[] aClaims, String aMessage, String aErrorCode ) {
			super( aDependency, aMessage, aErrorCode );
			_claim = aClaim;
			_claims = aClaims;
		}

		/**
		 * Instantiates a new {@link DependencyClaimException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aClaims the {@link Claim} instances related to this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public DependencyClaimException( Dependency aDependency, Claim aClaim, Claim[] aClaims, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aDependency, aMessage, aCause, aErrorCode );
			_claim = aClaim;
			_claims = aClaims;
		}

		/**
		 * Instantiates a new {@link DependencyClaimException}.
		 * 
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aClaims the {@link Claim} instances related to this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 */
		public DependencyClaimException( Dependency aDependency, Claim aClaim, Claim[] aClaims, String aMessage, Throwable aCause ) {
			super( aDependency, aMessage, aCause );
			_claim = aClaim;
			_claims = aClaims;
		}

		/**
		 * Instantiates a new {@link DependencyClaimException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aClaims the {@link Claim} instances related to this exception.
		 * @param aMessage The aMessage describing this exception.
		 */
		public DependencyClaimException( Dependency aDependency, Claim aClaim, Claim[] aClaims, String aMessage ) {
			super( aDependency, aMessage );
			_claim = aClaim;
			_claims = aClaims;
		}

		/**
		 * Instantiates a new {@link DependencyClaimException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aClaims the {@link Claim} instances related to this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public DependencyClaimException( Dependency aDependency, Claim aClaim, Claim[] aClaims, Throwable aCause, String aErrorCode ) {
			super( aDependency, aCause, aErrorCode );
			_claim = aClaim;
			_claims = aClaims;
		}

		/**
		 * Instantiates a new {@link DependencyClaimException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aClaims the {@link Claim} instances related to this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 */
		public DependencyClaimException( Dependency aDependency, Claim aClaim, Claim[] aClaims, Throwable aCause ) {
			super( aDependency, aCause );
			_claim = aClaim;
			_claims = aClaims;
		}

		// /////////////////////////////////////////////////////////////////////
		// METHODS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Retrieves the {@link Claim} instances related to this exception.
		 * 
		 * @return The unsatisfied {@link Dependency} declarations
		 */
		@Override
		public Claim[] getClaims() {
			return _claims;
		}

		/**
		 * Retrieves the {@link Claim} instance responsible for this exception.
		 * 
		 * @return The unsatisfied {@link Dependency} declarations
		 */
		@Override
		public Claim getClaim() {
			return _claim;
		}
	}

	/**
	 * The {@link ClaimDependenciesException} is a {@link DependenciesException}
	 * containing an additional related {@link Claim} instance.
	 */
	public static class ClaimDependenciesException extends DependenciesException implements ClaimAccessor {

		// /////////////////////////////////////////////////////////////////////
		// STATICS:
		// /////////////////////////////////////////////////////////////////////

		private static final long serialVersionUID = 1L;

		// /////////////////////////////////////////////////////////////////////
		// CONSTANTS:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// VARIABLES:
		// /////////////////////////////////////////////////////////////////////

		private Claim _claim;

		// /////////////////////////////////////////////////////////////////////
		// CONSTRUCTORS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Instantiates a new {@link ClaimDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The message describing this exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public ClaimDependenciesException( Dependency aDependency, Claim aClaim, Dependency[] aDependencies, String aMessage, String aErrorCode ) {
			super( aDependency, aDependencies, aMessage, aErrorCode );
			_claim = aClaim;
		}

		/**
		 * Instantiates a new {@link ClaimDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The message describing this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public ClaimDependenciesException( Dependency aDependency, Claim aClaim, Dependency[] aDependencies, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aDependency, aDependencies, aMessage, aCause, aErrorCode );
			_claim = aClaim;
		}

		/**
		 * Instantiates a new {@link ClaimDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aCause the cause
		 */
		public ClaimDependenciesException( Dependency aDependency, Claim aClaim, Dependency[] aDependencies, String aMessage, Throwable aCause ) {
			super( aDependency, aDependencies, aMessage, aCause );
			_claim = aClaim;
		}

		/**
		 * Instantiates a new {@link ClaimDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 */
		public ClaimDependenciesException( Dependency aDependency, Claim aClaim, Dependency[] aDependencies, String aMessage ) {
			super( aDependency, aDependencies, aMessage );
			_claim = aClaim;
		}

		/**
		 * Instantiates a new {@link ClaimDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public ClaimDependenciesException( Dependency aDependency, Claim aClaim, Dependency[] aDependencies, Throwable aCause, String aErrorCode ) {
			super( aDependency, aDependencies, aCause, aErrorCode );
			_claim = aClaim;
		}

		/**
		 * Instantiates a new {@link ClaimDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aClaim the {@link Claim} instance responsible for this
		 *        exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 */
		public ClaimDependenciesException( Dependency aDependency, Claim aClaim, Dependency[] aDependencies, Throwable aCause ) {
			super( aDependency, aDependencies, aCause );
			_claim = aClaim;
		}

		// /////////////////////////////////////////////////////////////////////
		// INJECTION:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// METHODS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Retrieves the {@link Claim} instance responsible for this exception.
		 * 
		 * @return The according {@link Claim} instance.
		 */
		@Override
		public Claim getClaim() {
			return _claim;
		}

		// /////////////////////////////////////////////////////////////////////
		// HOOKS:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// HELPER:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// INNER CLASSES:
		// /////////////////////////////////////////////////////////////////////
	}

	/**
	 * The {@link InitializerDependenciesException} is a {@link DependenciesException}
	 * containing an additional related {@link InitializerClaim} instance.
	 */
	public static class InitializerDependenciesException extends DependenciesException {

		// /////////////////////////////////////////////////////////////////////
		// STATICS:
		// /////////////////////////////////////////////////////////////////////

		private static final long serialVersionUID = 1L;

		// /////////////////////////////////////////////////////////////////////
		// CONSTANTS:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// VARIABLES:
		// /////////////////////////////////////////////////////////////////////

		private InitializerClaim _initializerClaim;

		// /////////////////////////////////////////////////////////////////////
		// CONSTRUCTORS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Instantiates a new {@link InitializerDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aInitializerClaim the {@link InitializerClaim} instance
		 *        responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The message describing this exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public InitializerDependenciesException( Dependency aDependency, InitializerClaim aInitializerClaim, Dependency[] aDependencies, String aMessage, String aErrorCode ) {
			super( aDependency, aDependencies, aMessage, aErrorCode );
			_initializerClaim = aInitializerClaim;
		}

		/**
		 * Instantiates a new {@link InitializerDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aInitializerClaim the {@link InitializerClaim} instance
		 *        responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The message describing this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public InitializerDependenciesException( Dependency aDependency, InitializerClaim aInitializerClaim, Dependency[] aDependencies, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aDependency, aDependencies, aMessage, aCause, aErrorCode );
			_initializerClaim = aInitializerClaim;
		}

		/**
		 * Instantiates a new {@link InitializerDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aInitializerClaim the {@link InitializerClaim} instance
		 *        responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aCause the cause
		 */
		public InitializerDependenciesException( Dependency aDependency, InitializerClaim aInitializerClaim, Dependency[] aDependencies, String aMessage, Throwable aCause ) {
			super( aDependency, aDependencies, aMessage, aCause );
			_initializerClaim = aInitializerClaim;
		}

		/**
		 * Instantiates a new {@link InitializerDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aInitializerClaim the {@link InitializerClaim} instance
		 *        responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 */
		public InitializerDependenciesException( Dependency aDependency, InitializerClaim aInitializerClaim, Dependency[] aDependencies, String aMessage ) {
			super( aDependency, aDependencies, aMessage );
			_initializerClaim = aInitializerClaim;
		}

		/**
		 * Instantiates a new {@link InitializerDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aInitializerClaim the {@link InitializerClaim} instance
		 *        responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public InitializerDependenciesException( Dependency aDependency, InitializerClaim aInitializerClaim, Dependency[] aDependencies, Throwable aCause, String aErrorCode ) {
			super( aDependency, aDependencies, aCause, aErrorCode );
			_initializerClaim = aInitializerClaim;
		}

		/**
		 * Instantiates a new {@link InitializerDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aInitializerClaim the {@link InitializerClaim} instance
		 *        responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 */
		public InitializerDependenciesException( Dependency aDependency, InitializerClaim aInitializerClaim, Dependency[] aDependencies, Throwable aCause ) {
			super( aDependency, aDependencies, aCause );
			_initializerClaim = aInitializerClaim;
		}

		// /////////////////////////////////////////////////////////////////////
		// INJECTION:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// METHODS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Retrieves the {@link InitializerClaim} instance responsible for this exception.
		 * 
		 * @return The according {@link InitializerClaim} instance.
		 */
		public InitializerClaim getInitializer() {
			return _initializerClaim;
		}

		// /////////////////////////////////////////////////////////////////////
		// HOOKS:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// HELPER:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// INNER CLASSES:
		// /////////////////////////////////////////////////////////////////////
	}
	
	/**
	 * The {@link FactoryDependenciesException} is a
	 * {@link DependenciesException} containing an additional related
	 * {@link FactoryClaim} instance.
	 */
	public static class FactoryDependenciesException extends DependenciesException {

		// /////////////////////////////////////////////////////////////////////
		// STATICS:
		// /////////////////////////////////////////////////////////////////////

		private static final long serialVersionUID = 1L;

		// /////////////////////////////////////////////////////////////////////
		// CONSTANTS:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// VARIABLES:
		// /////////////////////////////////////////////////////////////////////

		private FactoryClaim _factoryClaim;

		// /////////////////////////////////////////////////////////////////////
		// CONSTRUCTORS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Instantiates a new {@link FactoryDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aFactoryClaim the {@link FactoryClaim} instance responsible
		 *        for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The message describing this exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public FactoryDependenciesException( Dependency aDependency, FactoryClaim aFactoryClaim, Dependency[] aDependencies, String aMessage, String aErrorCode ) {
			super( aDependency, aDependencies, aMessage, aErrorCode );
			_factoryClaim = aFactoryClaim;
		}

		/**
		 * Instantiates a new {@link FactoryDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aFactoryClaim the {@link FactoryClaim} instance responsible
		 *        for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The message describing this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public FactoryDependenciesException( Dependency aDependency, FactoryClaim aFactoryClaim, Dependency[] aDependencies, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aDependency, aDependencies, aMessage, aCause, aErrorCode );
			_factoryClaim = aFactoryClaim;
		}

		/**
		 * Instantiates a new {@link FactoryDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aFactoryClaim the {@link FactoryClaim} instance responsible
		 *        for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aCause the cause
		 */
		public FactoryDependenciesException( Dependency aDependency, FactoryClaim aFactoryClaim, Dependency[] aDependencies, String aMessage, Throwable aCause ) {
			super( aDependency, aDependencies, aMessage, aCause );
			_factoryClaim = aFactoryClaim;
		}

		/**
		 * Instantiates a new {@link FactoryDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aFactoryClaim the {@link FactoryClaim} instance responsible
		 *        for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 */
		public FactoryDependenciesException( Dependency aDependency, FactoryClaim aFactoryClaim, Dependency[] aDependencies, String aMessage ) {
			super( aDependency, aDependencies, aMessage );
			_factoryClaim = aFactoryClaim;
		}

		/**
		 * Instantiates a new {@link FactoryDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aFactoryClaim the {@link FactoryClaim} instance responsible
		 *        for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public FactoryDependenciesException( Dependency aDependency, FactoryClaim aFactoryClaim, Dependency[] aDependencies, Throwable aCause, String aErrorCode ) {
			super( aDependency, aDependencies, aCause, aErrorCode );
			_factoryClaim = aFactoryClaim;
		}

		/**
		 * Instantiates a new {@link FactoryDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aFactoryClaim the {@link FactoryClaim} instance responsible
		 *        for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 */
		public FactoryDependenciesException( Dependency aDependency, FactoryClaim aFactoryClaim, Dependency[] aDependencies, Throwable aCause ) {
			super( aDependency, aDependencies, aCause );
			_factoryClaim = aFactoryClaim;
		}

		// /////////////////////////////////////////////////////////////////////
		// INJECTION:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// METHODS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Retrieves the {@link FactoryClaim} instance responsible for this
		 * exception.
		 * 
		 * @return The according {@link FactoryClaim} instance.
		 */
		public FactoryClaim getFactory() {
			return _factoryClaim;
		}

		// /////////////////////////////////////////////////////////////////////
		// HOOKS:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// HELPER:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// INNER CLASSES:
		// /////////////////////////////////////////////////////////////////////
	}

	/**
	 * The {@link AliasDependenciesException} is a {@link DependenciesException}
	 * containing an additional related alias.
	 */
	public static class AliasDependenciesException extends DependenciesException implements AliasAccessor {

		// /////////////////////////////////////////////////////////////////////
		// STATICS:
		// /////////////////////////////////////////////////////////////////////

		private static final long serialVersionUID = 1L;

		// /////////////////////////////////////////////////////////////////////
		// CONSTANTS:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// VARIABLES:
		// /////////////////////////////////////////////////////////////////////

		private String _alias;

		// /////////////////////////////////////////////////////////////////////
		// CONSTRUCTORS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Instantiates a new {@link AliasDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aAlias The alias responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The message describing this exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public AliasDependenciesException( Dependency aDependency, String aAlias, Dependency[] aDependencies, String aMessage, String aErrorCode ) {
			super( aDependency, aDependencies, aMessage, aErrorCode );
			_alias = aAlias;
		}

		/**
		 * Instantiates a new {@link AliasDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aAlias The alias responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The message describing this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public AliasDependenciesException( Dependency aDependency, String aAlias, Dependency[] aDependencies, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aDependency, aDependencies, aMessage, aCause, aErrorCode );
			_alias = aAlias;
		}

		/**
		 * Instantiates a new {@link AliasDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aAlias The alias responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 * @param aCause the cause
		 */
		public AliasDependenciesException( Dependency aDependency, String aAlias, Dependency[] aDependencies, String aMessage, Throwable aCause ) {
			super( aDependency, aDependencies, aMessage, aCause );
			_alias = aAlias;
		}

		/**
		 * Instantiates a new {@link AliasDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aAlias The alias responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aMessage The aMessage describing this exception.
		 */
		public AliasDependenciesException( Dependency aDependency, String aAlias, Dependency[] aDependencies, String aMessage ) {
			super( aDependency, aDependencies, aMessage );
			_alias = aAlias;
		}

		/**
		 * Instantiates a new {@link AliasDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aAlias The alias responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 * @param aErrorCode The error code identifying this exception.
		 */
		public AliasDependenciesException( Dependency aDependency, String aAlias, Dependency[] aDependencies, Throwable aCause, String aErrorCode ) {
			super( aDependency, aDependencies, aCause, aErrorCode );
			_alias = aAlias;
		}

		/**
		 * Instantiates a new {@link AliasDependenciesException}.
		 *
		 * @param aDependency The {@link Dependency} declaration causing this
		 *        exception.
		 * @param aAlias The alias responsible for this exception.
		 * @param aDependencies the {@link Dependency} declarations related to
		 *        this exception.
		 * @param aCause The {@link Throwable} ({@link Exception}) causing this
		 *        exception.
		 */
		public AliasDependenciesException( Dependency aDependency, String aAlias, Dependency[] aDependencies, Throwable aCause ) {
			super( aDependency, aDependencies, aCause );
			_alias = aAlias;
		}

		// /////////////////////////////////////////////////////////////////////
		// INJECTION:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// METHODS:
		// /////////////////////////////////////////////////////////////////////

		/**
		 * Retrieves The alias responsible for this exception.
		 * 
		 * @return The according {@link String} instance.
		 */
		@Override
		public String getAlias() {
			return _alias;
		}

		// /////////////////////////////////////////////////////////////////////
		// HOOKS:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// HELPER:
		// /////////////////////////////////////////////////////////////////////

		// /////////////////////////////////////////////////////////////////////
		// INNER CLASSES:
		// /////////////////////////////////////////////////////////////////////
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy