Class Accessor


  • public final class Accessor
    extends Object
    An immutable, fluent path of Steps that projects a value (or a sub-subject stream) from a subject - e.g. arg(0).value, call.descriptor, method.modifiers.
    • Constructor Detail

      • Accessor

        public Accessor​(List<Step> steps)
        Creates an accessor from a non-empty step path.
        Parameters:
        steps - the projection steps, copied defensively
        Throws:
        IllegalArgumentException - if steps is empty
    • Method Detail

      • steps

        public List<Step> steps()
        Returns:
        the immutable step path
      • first

        public Step first()
        Returns:
        the first step of the path
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object