Marker (SLF4J 1.7.4 API)
Date: 2013-03-18

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

## org.slf4j
Interface Marker

All Superinterfaces:
  Serializable

All Known Implementing Classes:
  BasicMarker

    public interface Marker

extends Serializable

Markers are named objects used to enrich log statements. Conforming logging system Implementations of SLF4J determine how information conveyed by markers are used, if at all. In particular, many conforming logging systems ignore marker data.

Markers can contain references to other markers, which in turn may contain references of their own.

Author:
  Ceki Gülcü

Field Summary
`static String` | `ANY_MARKER` This constant represents any marker, including a null marker.
`static String` | `ANY_NON_NULL_MARKER` This constant represents any non-null marker.

Method Summary
`void` | `add(Marker reference)` Add a reference to another Marker.
`boolean` | `contains(Marker other)` Does this marker contain a reference to the 'other' marker?
`boolean` | `contains(String name)` Does this marker contain the marker named 'name'?
`boolean` | `equals(Object o)` Markers are considered equal if they have the same name.
`String` | `getName()` Get the name of this Marker.
`boolean` | `hasChildren()` Deprecated. Replaced by `hasReferences()`.
`int` | `hashCode()` Compute the hash code based on the name of this marker.
`boolean` | `hasReferences()` Does this marker have any references?
`Iterator` | `iterator()` Returns an Iterator which can be used to iterate over the references of this marker.
`boolean` | `remove(Marker reference)` Remove a marker reference.

Field Detail

### ANY_MARKER

    static final String ANY_MARKER

  This constant represents any marker, including a null marker.

  See Also:
    Constant Field Values

### ANY_NON_NULL_MARKER

    static final String ANY_NON_NULL_MARKER

  This constant represents any non-null marker.

  See Also:
    Constant Field Values

Method Detail

### getName

    String getName()

  Get the name of this Marker.

  Returns:
    name of marker

### add

    void add(Marker reference)

  Add a reference to another Marker.

  Parameters:
    `reference` - a reference to another marker
  Throws:
    `IllegalArgumentException` - if 'reference' is null

### remove

    boolean remove(Marker reference)

  Remove a marker reference.

  Parameters:
    `reference` - the marker reference to remove
  Returns:
    true if reference could be found and removed, false otherwise.

### hasChildren

    boolean hasChildren()

  Deprecated. Replaced by `hasReferences()`.

### hasReferences

    boolean hasReferences()

  Does this marker have any references?

  Returns:
    true if this marker has one or more references, false otherwise.

### iterator

    Iterator iterator()

  Returns an Iterator which can be used to iterate over the references of this marker. An empty iterator is returned when this marker has no references.

  Returns:
    Iterator over the references of this marker

### contains

    boolean contains(Marker other)

  Does this marker contain a reference to the 'other' marker? Marker A is defined to contain marker B, if A == B or if B is referenced by A, or if B is referenced by any one of A's references (recursively).

  Parameters:
    `other` - The marker to test for inclusion.
  Returns:
    Whether this marker contains the other marker.
  Throws:
    `IllegalArgumentException` - if 'other' is null

### contains

    boolean contains(String name)

  Does this marker contain the marker named 'name'? If 'name' is null the returned value is always false.

  Parameters:
    `name` - The marker name to test for inclusion.
  Returns:
    Whether this marker contains the other marker.

### equals

    boolean equals(Object o)

  Markers are considered equal if they have the same name.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `o` -
  Returns:
    true, if this.name equals o.name
  Since:
    1.5.1

### hashCode

    int hashCode()

  Compute the hash code based on the name of this marker. Note that markers are considered equal if they have the same name.

  Overrides:
    `hashCode` in class `Object`
  Returns:
    the computed hashCode
  Since:
    1.5.1

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 © 2005-2013 QOS.ch. All Rights Reserved.