Class LexicalScope

java.lang.Object
net.sourceforge.pmd.lang.java.types.LexicalScope
All Implemented Interfaces:
Function<String,JTypeVar>

public final class LexicalScope extends Object
An index of type variables by name.
  • Field Details

    • EMPTY

      public static final LexicalScope EMPTY
      The empty scope contains no vars.
  • Method Details

    • apply

      public @Nullable JTypeVar apply(@NonNull String var)
      Returns the type var with the given name, or null.
    • andThen

      public LexicalScope andThen(List<? extends JTypeVar> vars)
      Return a new scope which contains the given tvars. They shadow tvars that were in this scope.
    • getMap

      protected Map<String,@Nullable JTypeVar> getMap()
    • isEmpty

      public boolean isEmpty()
    • toString

      public String toString()
      Overrides:
      toString in class Object