Class FrameProcessor

    • Constructor Detail

      • FrameProcessor

        public FrameProcessor​(Settings settings,
                              IEvaluator evaluator,
                              Map<String,​Object> variables,
                              Collection<TracePointConfig> tracePointConfigs,
                              long[] lineStart,
                              StackTraceElement[] stack,
                              String methodName)
        Create a new processor for this Callback.
        Parameters:
        settings - the current settings being used
        evaluator - the evaluator to use for watchers and conditions
        variables - the variables we have at this state
        tracePointConfigs - the tracepoints that are part of this Callback
        lineStart - the Tuple of the time this Callback started
        stack - the stack trace to use
        methodName - the name of the method we are wrapping, or null if not a method wrapped collection
    • Method Detail

      • canCollect

        public boolean canCollect()
        Using the tracePointConfigs can we collect any data at this point.

        This method will check the tracepoint config fire count, rate limits, windows and conditions and populate the filteredTracepoints

        Returns:
        true, if the filteredTracepoints have any values
      • configureSelf

        public void configureSelf()
        Using the filteredTracepoints update the config to reflect the collection config for this Callback.

        If there are multiple tracepoints being process, the config will reflect the most inclusive, ie the higher number.

      • evaluateExpression

        public String evaluateExpression​(String expression)
                                  throws EvaluationException
        Evaluate an expression in the frame of the tracepoint that triggered this snapshot.
        Specified by:
        evaluateExpression in interface ISnapshotContext
        Parameters:
        expression - the express to evaluate
        Returns:
        the result of the expression as a string
        Throws:
        EvaluationException - if there were any issues evaluating the expression
      • getLineStart

        public long[] getLineStart()