Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javatest
Class TestFilter

    java.lang.Object
      com.sun.javatest.TestFilter

Direct Known Subclasses:
  AllTestsFilter, CompositeFilter, ExcludeListFilter, InitialUrlFilter, KeywordsFilter, ObservableTestFilter, StatusFilter

    public abstract class TestFilter

extends java.lang.Object

A filter interface for TestDescriptions. Implementations of this class should implement the `equals()` and `hashCode()` as per the spec in java.lang.Object. This is used by the harness for file equality purposes which looking for changes and optimizations to perform.

See Also:
  `TestDescription`

Nested Class Summary
`static class` | `TestFilter.Fault` This exception is to report problems that occur while filtering tests.
`static interface` | `TestFilter.Observer` An interface for notification about why a test has been filtered out.

Constructor Summary
`TestFilter()`

Method Summary
`abstract boolean` | `accepts(TestDescription td)` Determines whether a TestDescription should be accepted or rejected by this filter.
`boolean` | `accepts(TestDescription td, TestFilter.Observer o)` Determines whether a TestDescription should be accepted or rejected by this filter; if rejected, it is reported to the provided observer.
`boolean` | `accepts(TestResult tr)`
`boolean` | `accepts(TestResult tr, TestFilter.Observer o)`
`abstract java.lang.String` | `getDescription()` Get a description of this filter, as might be used to give more details about this filter than provided by `getName()`.
`abstract java.lang.String` | `getName()` Get the name of this filter, as might be used to choose of of a set of filters.
`abstract java.lang.String` | `getReason()` Get the reason why this filter would reject a test, as might be used in reports.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TestFilter

    public TestFilter()

Method Detail

### getName

    public abstract java.lang.String getName()

  Get the name of this filter, as might be used to choose of of a set of filters. This string should be localized.

  Returns:
    the name of this filter

### getDescription

    public abstract java.lang.String getDescription()

  Get a description of this filter, as might be used to give more details about this filter than provided by `getName()`. This string should be localized.

  Returns:
    a description of this filter

### getReason

    public abstract java.lang.String getReason()

  Get the reason why this filter would reject a test, as might be used in reports. This string should be localized.

  Returns:
    a rejection reason for this filter

### accepts

    public abstract boolean accepts(TestDescription td)
                             throws TestFilter.Fault

  Determines whether a TestDescription should be accepted or rejected by this filter.

  Parameters:
    `td` - the TestDescription to check
  Returns:
    true if td should be included in collection; false otherwise.
  Throws:
    `TestFilter.Fault` - if an error occurs while trying to determine if this test should be accepted or not.

### accepts

    public boolean accepts(TestResult tr)
                    throws TestFilter.Fault,
                           TestResult.Fault

  Throws:
    `TestFilter.Fault`
    `TestResult.Fault`

### accepts

    public boolean accepts(TestDescription td,
                           TestFilter.Observer o)
                    throws TestFilter.Fault

  Determines whether a TestDescription should be accepted or rejected by this filter; if rejected, it is reported to the provided observer.

  Parameters:
    `td` - The TestDescription to check.
    `o` - An observer, which will be notified if the test is rejected by this filter.
  Returns:
    true if td should be included in collection; false otherwise.
  Throws:
    `TestFilter.Fault` - if an error occurs while trying to determine if this test should be accepted or not.

### accepts

    public boolean accepts(TestResult tr,
                           TestFilter.Observer o)
                    throws TestFilter.Fault,
                           TestResult.Fault

  Throws:
    `TestFilter.Fault`
    `TestResult.Fault`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.