com.io7m.jpra.model.statements

## Class StatementPackageImport<I,T>

- java.lang.Object
- - com.io7m.jpra.model.statements.StatementPackageImport<I,T>

- Type Parameters:
    `I` - The type of identifiers
    `T` - The type of type information
  All Implemented Interfaces:
    ModelElementType, StatementType<I,T>

      public final class StatementPackageImport<I,T>
      extends Object
      implements ModelElementType, StatementType<I,T>

  The `import` statement.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatementPackageImport(PackageNameQualified in_pack, PackageNameUnqualified in_using)` Construct a statement.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>>` | `getLexicalInformation()` Fetch the lexical information for the element.
    `PackageNameQualified` | `getPackageName()`
    `PackageNameUnqualified` | `getUsing()`
    `<A,E extends Exception> A` | `matchStatement(StatementMatcherType<I,T,A,E> m)` Accept a matcher.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StatementPackageImport

          public StatementPackageImport(PackageNameQualified in_pack,
                                        PackageNameUnqualified in_using)

      Construct a statement.
      Parameters:
        `in_pack` - The imported package
        `in_using` - The name that will be used to refer to the package

  - ### Method Detail

    - #### getUsing

          public PackageNameUnqualified getUsing()

      Returns:
        The short name

    - #### getPackageName

          public PackageNameQualified getPackageName()

      Returns:
        The target package name

    - #### getLexicalInformation

          public Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> getLexicalInformation()

      Description copied from interface: `ModelElementType`
      Fetch the lexical information for the element. This is used to localize error messages to a position in a file when referring to specific elements.
      Specified by:
        `getLexicalInformation` in interface `ModelElementType`
      Returns:
        The original lexical information, if any

    - #### matchStatement

          public <A,E extends Exception> A matchStatement(StatementMatcherType<I,T,A,E> m)
                                                   throws E extends Exception

      Description copied from interface: `StatementType`
      Accept a matcher.
      Specified by:
        `matchStatement` in interface `StatementType<I,T>`
      Type Parameters:
        `A` - The type of returned values
        `E` - The type of raised exceptions
      Parameters:
        `m` - The matcher
      Returns:
        The value returned by `m`
      Throws:
        `E` - If `m` raises `E`
        `E extends Exception`

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