Package: org.grails.exceptions.reporting

## [Java] Class DefaultStackTraceFilterer

- org.grails.exceptions.reporting.DefaultStackTraceFilterer

- All Implemented Interfaces and Traits:
    StackTraceFilterer

      public class DefaultStackTraceFilterer
      extends java.lang.Object
      implements StackTraceFilterer

  Default implementation of StackTraceFilterer.

  Since:
    2.0
  Authors:
    Graeme Rocher

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static java.lang.String[]` | `DEFAULT_INTERNAL_PACKAGES` |
    `static org.apache.commons.logging.Log` | `STACK_LOG` |
    `static java.lang.String` | `STACK_LOG_NAME` |
    `private java.lang.String` | `cutOffPackage` |
    `private java.util.List<java.lang.String>` | `packagesToFilter` |
    `private boolean` | `shouldFilter` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `DefaultStackTraceFilterer ()`
    `DefaultStackTraceFilterer (boolean shouldFilter)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `addInternalPackage(java.lang.String name)`
    `` | `public java.lang.Throwable` | `filter(java.lang.Throwable source, boolean recursive)`
    `` | `public java.lang.Throwable` | `filter(java.lang.Throwable source)`
    `` | `private java.util.List<java.lang.StackTraceElement>` | `filterTraceWithCutOff(java.lang.StackTraceElement[] trace, java.lang.String endPackage)`
    `` | `protected boolean` | `isApplicationClass(java.lang.String className)` Whether the given class name is an internal class and should be filtered
    `` | `public void` | `setCutOffPackage(java.lang.String cutOffPackage)`
    `` | `public void` | `setShouldFilter(boolean shouldFilter)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private static final java.lang.String[] DEFAULT_INTERNAL_PACKAGES

    - #### public static final org.apache.commons.logging.Log STACK_LOG

    - #### public static final java.lang.String STACK_LOG_NAME

    - #### private java.lang.String cutOffPackage

    - #### private java.util.List<java.lang.String> packagesToFilter

    - #### private boolean shouldFilter

  - ### Constructor Detail

    - #### public DefaultStackTraceFilterer()

    - #### public DefaultStackTraceFilterer(boolean shouldFilter)

  - ### Method Detail

    - #### public void addInternalPackage(java.lang.String name)

    - #### public java.lang.Throwable filter(java.lang.Throwable source, boolean recursive)

    - #### public java.lang.Throwable filter(java.lang.Throwable source)

    - #### private java.util.List<java.lang.StackTraceElement> filterTraceWithCutOff(java.lang.StackTraceElement[] trace, java.lang.String endPackage)

    - #### protected boolean isApplicationClass(java.lang.String className)

      Whether the given class name is an internal class and should be filtered

      Parameters:
        `className` - The class name
      Returns:
        true if is internal

    - #### public void setCutOffPackage(java.lang.String cutOffPackage)

    - #### public void setShouldFilter(boolean shouldFilter)