Class CrawlPath

    • Field Detail

      • backtrackTarget

        private int backtrackTarget
      • backtrackSuccess

        private boolean backtrackSuccess
      • reachedNearDup

        private int reachedNearDup
    • Constructor Detail

      • CrawlPath

        public CrawlPath​(int backtrackTarget)
        Start a new empty CrawlPath.
      • CrawlPath

        public CrawlPath​(List<Eventable> delegate,
                         int backtrackTarget)
        Create a new CrawlPath based on a delegate.
        Parameters:
        delegate - the List implementation where this CrawlPath is based on.
    • Method Detail

      • delegate

        protected List<Eventable> delegate()
        Specified by:
        delegate in class com.google.common.collect.ForwardingList<Eventable>
      • last

        public Eventable last()
        Get the last Eventable in the path.
        Returns:
        the last Eventable in the path
      • immutableCopy

        public CrawlPath immutableCopy()
        Create an immutableCopy of the current CrawlPath, used for backtracking for giving them to plugins.
        Returns:
        the CrawlPath based on an immutable list.
      • immutableCopyWithoutLast

        public CrawlPath immutableCopyWithoutLast()
      • immutableCopy

        private CrawlPath immutableCopy​(boolean removeLast)
      • getBacktrackTarget

        public int getBacktrackTarget()
      • setBacktrackTarget

        public void setBacktrackTarget​(int backtrackTarget)
      • isBacktrackSuccess

        public boolean isBacktrackSuccess()
      • setBacktrackSuccess

        public void setBacktrackSuccess​(boolean backtrackSuccess)
      • isReachedNearDup

        public int isReachedNearDup()
      • setReachedNearDup

        public void setReachedNearDup​(int reachedNearDup)
      • asStackTrace

        public StackTraceElement[] asStackTrace()
        Build a stack trace for this path. This can be used in generating more meaningful exceptions while using Crawljax in conjunction with JUnit for example.
        Returns:
        a array of StackTraceElements denoting the steps taken by this path. The first element [0] denotes the last Eventable on this path while the last item denotes the first Eventable executed.