com.io7m.jpra.compiler.core.resolver

## Class JPRACompilerResolverException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.io7m.jpra.core.JPRAException
      - - com.io7m.jpra.compiler.core.JPRACompilerException
        - - com.io7m.jpra.compiler.core.resolver.JPRACompilerResolverException

- All Implemented Interfaces:
    Serializable

      public final class JPRACompilerResolverException
      extends JPRACompilerException

  The type of exceptions raised during checking.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JPRACompilerResolverException(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> in_lex, JPRAResolverErrorCode in_code, Exception e)` Construct an exception.
    `JPRACompilerResolverException(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> in_lex, JPRAResolverErrorCode in_code, String message)` Construct an exception.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JPRACompilerResolverException` | `duplicatePackage(PackageNameQualified name, PackageNameQualified original)`
    `static JPRACompilerResolverException` | `duplicateType(TypeName current, TypeName original)`
    `static JPRACompilerResolverException` | `expectedPackage(PackageNameQualified p)`
    `JPRAResolverErrorCode` | `getErrorCode()`
    `static JPRACompilerResolverException` | `nestedPackage(PackageNameQualified name)`
    `static JPRACompilerResolverException` | `noCurrentPackage(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> lex)`
    `static JPRACompilerResolverException` | `nonexistentPackage(PackageNameQualified name)`
    `static JPRACompilerResolverException` | `nonexistentPackageReference(PackageNameUnqualified name)`
    `static JPRACompilerResolverException` | `nonexistentType(Optional<PackageNameQualified> q_name, TypeName t_name)`
    `static JPRACompilerResolverException` | `packageImportConflict(PackageNameUnqualified existing_name, PackageNameUnqualified new_name)`
    `static JPRACompilerResolverException` | `unexpectedEOF(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> lex_opt)`
    `static JPRACompilerResolverException` | `unexpectedPackage(PackageNameQualified expected, PackageNameQualified got)`

    - ### Methods inherited from class com.io7m.jpra.compiler.core.JPRACompilerException

      `getLexicalInformation`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, 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

    - #### JPRACompilerResolverException

          public JPRACompilerResolverException(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> in_lex,
                                               JPRAResolverErrorCode in_code,
                                               String message)

      Construct an exception.
      Parameters:
        `in_lex` - Lexical information, if any
        `in_code` - The error code
        `message` - The exception message

    - #### JPRACompilerResolverException

          public JPRACompilerResolverException(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> in_lex,
                                               JPRAResolverErrorCode in_code,
                                               Exception e)

      Construct an exception.
      Parameters:
        `in_lex` - Lexical information, if any
        `in_code` - The error code
        `e` - The cause

  - ### Method Detail

    - #### duplicatePackage

          public static JPRACompilerResolverException duplicatePackage(PackageNameQualified name,
                                                                       PackageNameQualified original)

      Parameters:
        `name` - The package name
        `original` - The original declaration
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.PACKAGE_DUPLICATE`

    - #### noCurrentPackage

          public static JPRACompilerResolverException noCurrentPackage(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> lex)

      Parameters:
        `lex` - Lexical information
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.NO_CURRENT_PACKAGE`

    - #### nestedPackage

          public static JPRACompilerResolverException nestedPackage(PackageNameQualified name)

      Parameters:
        `name` - The package name
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.PACKAGE_NESTED`

    - #### packageImportConflict

          public static JPRACompilerResolverException packageImportConflict(PackageNameUnqualified existing_name,
                                                                            PackageNameUnqualified new_name)

      Parameters:
        `existing_name` - The original name
        `new_name` - The new name
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.PACKAGE_IMPORT_CONFLICT`

    - #### duplicateType

          public static JPRACompilerResolverException duplicateType(TypeName current,
                                                                    TypeName original)

      Parameters:
        `current` - The current type name
        `original` - The original type name
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.TYPE_DUPLICATE`

    - #### nonexistentPackage

          public static JPRACompilerResolverException nonexistentPackage(PackageNameQualified name)

      Parameters:
        `name` - The package name
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.PACKAGE_NONEXISTENT`

    - #### nonexistentPackageReference

          public static JPRACompilerResolverException nonexistentPackageReference(PackageNameUnqualified name)

      Parameters:
        `name` - The package name
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.PACKAGE_REFERENCE_NONEXISTENT`

    - #### nonexistentType

          public static JPRACompilerResolverException nonexistentType(Optional<PackageNameQualified> q_name,
                                                                      TypeName t_name)

      Parameters:
        `q_name` - The package name, if any
        `t_name` - The type name
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.TYPE_NONEXISTENT`

    - #### unexpectedEOF

          public static JPRACompilerResolverException unexpectedEOF(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> lex_opt)

      Parameters:
        `lex_opt` - Lexical information, if any
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.UNEXPECTED_EOF`

    - #### unexpectedPackage

          public static JPRACompilerResolverException unexpectedPackage(PackageNameQualified expected,
                                                                        PackageNameQualified got)

      Parameters:
        `expected` - The expected package
        `got` - The received package
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.UNEXPECTED_PACKAGE`

    - #### expectedPackage

          public static JPRACompilerResolverException expectedPackage(PackageNameQualified p)

      Parameters:
        `p` - The expected package
      Returns:
        An exception
      See Also:
        `JPRAResolverErrorCode.EXPECTED_PACKAGE`

    - #### getErrorCode

          public JPRAResolverErrorCode getErrorCode()

      Returns:
        The error code

Copyright © 2015 <code@io7m.com> http://io7m.com