Interface IScope


public interface IScope
  • Method Details

    • getEnclosingScope

      IScope getEnclosingScope()
    • getSymbolsSize

      int getSymbolsSize()
      Returns:
      number of symbols directly defined/contained in this scope (not in enclosing scope).
    • isShadowing

      boolean isShadowing()
      Returns:
      true, if this scope shadows symbols of the enclosing scope. By default, named scopes (see #getName()) are shadowing scopes.
    • isPresentSpanningSymbol

      boolean isPresentSpanningSymbol()
      Returns:
      true, if this scope is spanned by a symbol. For example, a Java method spans a method scope.
    • isExportingSymbols

      boolean isExportingSymbols()
      States whether this scope exports symbols that can be used from outside the scope. For example, a Java class exports symbols. In contrast, a Java if-block does notisym export any symbols, hence, its locally defined variables cannot be referenced from outside. By default, a scope with a name exports its symbols (although this does not apply for Java methods).
      Returns:
      true, if this scope exports symbols that can be used from outside the scope.
    • isOrdered

      boolean isOrdered()
    • setExportingSymbols

      void setExportingSymbols(boolean b)
    • setShadowing

      void setShadowing(boolean b)
    • setOrdered

      void setOrdered(boolean b)
    • setAstNode

      void setAstNode(ASTNode node)
      Parameters:
      node - the corresponding ast node
    • setAstNodeAbsent

      void setAstNodeAbsent()
    • getAstNode

      ASTNode getAstNode()
    • isPresentAstNode

      boolean isPresentAstNode()
    • setSpanningSymbol

      void setSpanningSymbol(IScopeSpanningSymbol symbol)
    • setSpanningSymbolAbsent

      void setSpanningSymbolAbsent()
    • getSpanningSymbol

      IScopeSpanningSymbol getSpanningSymbol()
    • setName

      void setName(String name)
    • setNameAbsent

      void setNameAbsent()
    • getName

      String getName()
    • isPresentName

      boolean isPresentName()
    • getRemainingNameForResolveDown

      default List<String> getRemainingNameForResolveDown(String symbolName)
    • getNameParts

      default com.google.common.collect.FluentIterable<String> getNameParts(String symbolName)
    • checkIfContinueWithEnclosingScope

      default boolean checkIfContinueWithEnclosingScope(boolean foundSymbols)
    • checkIfContinueAsSubScope

      default boolean checkIfContinueAsSubScope(String symbolName)
    • getResolvedOrThrowException

      default <T extends ISymbol> Optional<T> getResolvedOrThrowException(Collection<T> resolved)
    • filterSymbolsByAccessModifier

      default <T extends ISymbol> List<T> filterSymbolsByAccessModifier(AccessModifier modifier, Collection<T> resolvedUnfiltered)
    • getUnknownSymbols

      default com.google.common.collect.LinkedListMultimap<String,SymbolWithScopeOfUnknownKind> getUnknownSymbols()
    • getLocalUnknownSymbols

      default List<SymbolWithScopeOfUnknownKind> getLocalUnknownSymbols()
    • add

      default void add(SymbolWithScopeOfUnknownKind symbol)
    • remove

      default void remove(SymbolWithScopeOfUnknownKind symbol)
    • accept

      default void accept(ITraverser visitor)
    • isSubScopeOf

      default boolean isSubScopeOf(IScope superScope)
      whether this is a subscope of the other scope (transitive)
    • isProperSubScopeOf

      default boolean isProperSubScopeOf(IScope superScope)
      whether this is a proper subscope of the other scope (transitive)