org.ungoverned.moduleloader.search
Class ValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.ungoverned.moduleloader.search.ValidationException
All Implemented Interfaces:
java.io.Serializable

public class ValidationException
extends java.lang.Exception

This exception is thrown if a module cannot be validated. The module that failed to be validated is recorded, along with the failed import target identifier and version number. If the error was a result of a propagation conflict, then the propagation error flag is set.

See Also:
ImportSearchPolicy.validate(org.ungoverned.moduleloader.Module), Serialized Form

Constructor Summary
ValidationException(java.lang.String msg, Module module, java.lang.Object identifier, java.lang.Object version, boolean isPropagation)
          Constructs an exception with the specified message, module, import identifier, import version number, and propagation flag.
 
Method Summary
 java.lang.Object getIdentifier()
          Returns the identifier of the import target that could not be resolved.
 Module getModule()
          Returns the module that was being validated.
 java.lang.Object getVersion()
          Returns the version number of the import target that could not be resolved.
 boolean isPropagationError()
          Returns a flag indicating whether the exception was caused by a a propagation conflict.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationException

public ValidationException(java.lang.String msg,
                           Module module,
                           java.lang.Object identifier,
                           java.lang.Object version,
                           boolean isPropagation)
Constructs an exception with the specified message, module, import identifier, import version number, and propagation flag.

Method Detail

getModule

public Module getModule()
Returns the module that was being validated.

Returns:
the module that was being validated.

getIdentifier

public java.lang.Object getIdentifier()
Returns the identifier of the import target that could not be resolved.

Returns:
the identifier of the import target that could not be resolved.

getVersion

public java.lang.Object getVersion()
Returns the version number of the import target that could not be resolved.

Returns:
the version number of the import target that could not be resolved.

isPropagationError

public boolean isPropagationError()
Returns a flag indicating whether the exception was caused by a a propagation conflict.

Returns:
true if the exception was thrown due to a propagation conflict, false otherwise.