Class Resolver3.ImportContext

java.lang.Object
eu.bandm.tools.d2d2.base.Resolver3.ImportContext
Enclosing class:
Resolver3

protected class Resolver3.ImportContext extends Object
Stack frames which represent dynamic import situations. So one particulat instance corresponds to one particulat import prefix chain like "$" or "A.B.C". They form a tree, linked towards root by the field predec. Most further fields are mere convenience fields, redundantly copied from the source code level expression importItem: whether there is any rewriting at all; a reference to the raw module model instance; its name; the import key, etc.
  • Field Details

    • predec

      Maybe ==null only for top level (pseudo) import context.
    • importItem

      @Opt final @Opt ImportItem importItem
      Maybe ==null only for top level (pseudo) import context.
    • moduleAddress

      final String moduleAddress
      The (fully expanded) name used to load the module source text.
    • rawModule

      final Module rawModule
      The parsed un-rewritten Module.
    • key

      final String key
      The source level key identifier in the import statement. For identification not this field is used, but the result of compoundKey().
    • subs

      All imports relative to this instance, indexed by their key string. A value ==null indicates an earlier failed load attempt.
    • unrewritten

      final boolean unrewritten
      Indicates that no rewrite operations come with the underlying ImportItem.
  • Constructor Details

  • Method Details

    • compoundKeyX

      public String compoundKeyX()
      The sequence of all import keys which lead to this dynamic ImportContext. The root is represented by a special name Resolver3.rootModuleSymbolicName, for documentation generation and debugging.
    • compoundKey

      public String compoundKey()
      The sequence of all import keys which lead to this dynamic ImportContext. The root situation is just the empty string. This yields the complete import prefix, as it would appear in the ".ddf" source text of the root module.
    • compoundKey

      public String compoundKey(Definition def)
      The sequence of all import keys which lead to this dynamic ImportContext plus the name of the Definition. The root situation is just the empty string. This yields the complete textual reference to that definition, as it would appear in the ".ddf" source text of the root module.