Class ScopeFilter

  • All Implemented Interfaces:
    VisitableFilter

    public class ScopeFilter
    extends java.lang.Object
    implements VisitableFilter
    Filter which passes Visitables only if the compiler is inside a named scope.
    • Constructor Summary

      Constructors 
      Constructor Description
      ScopeFilter​(CompilerContext compilerContext, java.lang.String scopeName, int minDepth)
      Construct a filter for the given scope and minimal expected depth.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(Visitable visitable)
      Return true if the Visitable passes the filter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _scopeName

        private java.lang.String _scopeName
      • _minDepth

        private int _minDepth
    • Constructor Detail

      • ScopeFilter

        public ScopeFilter​(CompilerContext compilerContext,
                           java.lang.String scopeName,
                           int minDepth)
        Construct a filter for the given scope and minimal expected depth.