Top Description Fields Constructors Methods
org.slf4j.helpers

public Class BasicMarker

extends Object
implements Marker
Class Inheritance
All Implemented Interfaces
org.slf4j.Marker, java.io.Serializable
Imports
java.util.Iterator, .List, java.util.concurrent.CopyOnWriteArrayList, org.slf4j.Marker

A simple implementation of the Marker interface.
Authors
Ceki Gülcü, Joern Huxhorn

Field Summary

Modifier and TypeField and Description
private static final String
private final String
private static final String
private final List<Marker>
private static final String
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
add(Marker reference)

Implements org.slf4j.Marker.add.

Add a reference to another Marker.

public boolean
contains(Marker other)

Implements org.slf4j.Marker.contains.

Does this marker contain a reference to the 'other' marker?

public boolean
contains(String name)

Implements org.slf4j.Marker.contains.

This method is mainly used with Expression Evaluators.

public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Implements org.slf4j.Marker.equals.

Markers are considered equal if they have the same name.

public String
getName()

Implements org.slf4j.Marker.getName.

Get the name of this Marker.

public boolean
hasChildren()

Implements org.slf4j.Marker.hasChildren.

Deprecated

public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements org.slf4j.Marker.hashCode.

Compute the hash code based on the name of this marker.

public boolean
hasReferences()

Implements org.slf4j.Marker.hasReferences.

Does this marker have any references?

public Iterator<Marker>
iterator()

Implements org.slf4j.Marker.iterator.

Returns an Iterator which can be used to iterate over the references of this marker.

public boolean
remove(Marker referenceToRemove)

Implements org.slf4j.Marker.remove.

Remove a marker reference.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

CLOSEback to summary
private static final String CLOSE
nameback to summary
private final String name
OPENback to summary
private static final String OPEN
referenceListback to summary
private final List<Marker> referenceList
SEPback to summary
private static final String SEP
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

BasicMarkerback to summary
pack-priv BasicMarker(String name)

Method Detail

addback to summary
public void add(Marker reference)

Implements org.slf4j.Marker.add.

Doc from org.slf4j.Marker.add.

Add a reference to another Marker.

Note that the fluent API allows adding multiple markers to a logging statement. It is often preferable to use multiple markers instead of nested markers.

containsback to summary
public boolean contains(Marker other)

Implements org.slf4j.Marker.contains.

Doc from org.slf4j.Marker.contains.

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).

containsback to summary
public boolean contains(String name)

Implements org.slf4j.Marker.contains.

This method is mainly used with Expression Evaluators.

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Implements org.slf4j.Marker.equals.

Doc from org.slf4j.Marker.equals.

Markers are considered equal if they have the same name.

getNameback to summary
public String getName()

Implements org.slf4j.Marker.getName.

Doc from org.slf4j.Marker.getName.

Get the name of this Marker.

hasChildrenback to summary
public boolean hasChildren()

Implements org.slf4j.Marker.hasChildren.

Deprecated

Annotations
@Deprecated
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements org.slf4j.Marker.hashCode.

Doc from org.slf4j.Marker.hashCode.

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

hasReferencesback to summary
public boolean hasReferences()

Implements org.slf4j.Marker.hasReferences.

Doc from org.slf4j.Marker.hasReferences.

Does this marker have any references?

iteratorback to summary
public Iterator<Marker> iterator()

Implements org.slf4j.Marker.iterator.

Doc from org.slf4j.Marker.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.

removeback to summary
public boolean remove(Marker referenceToRemove)

Implements org.slf4j.Marker.remove.

Doc from org.slf4j.Marker.remove.

Remove a marker reference.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.