Class InvocationFilter

java.lang.Object
spoon.reflect.visitor.filter.InvocationFilter
All Implemented Interfaces:
Filter<CtInvocation<?>>

public class InvocationFilter extends Object implements Filter<CtInvocation<?>>
This simple filter matches all the accesses to a given executable or any executable that overrides it.
  • Constructor Details

    • InvocationFilter

      public InvocationFilter(CtExecutableReference<?> executable)
      Creates a new invocation filter.
      Parameters:
      executable - the executable to be tested for being invoked
    • InvocationFilter

      public InvocationFilter(CtMethod<?> method)
      Creates a new invocation filter.
      Parameters:
      method - the executable to be tested for being invoked.
  • Method Details

    • matches

      public boolean matches(CtInvocation<?> invocation)
      Description copied from interface: Filter
      Tells if the given element matches.
      Specified by:
      matches in interface Filter<CtInvocation<?>>
      Parameters:
      invocation - - the element to be checked for a match. Parameter element is never null if Query is used.