Class OverriddenMethodFilter

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

public class OverriddenMethodFilter extends Object implements Filter<CtMethod<?>>
Gets all overridden method from the method given.
  • Constructor Details

    • OverriddenMethodFilter

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

    • includingSelf

      public OverriddenMethodFilter includingSelf(boolean includingSelf)
      Parameters:
      includingSelf - if false then element which is equal to the #method is not matching. false is default behavior
    • matches

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