public static class MarkerManager.Log4jMarker extends Objectimplements Marker
The actual Marker implementation.
Internal note: We could make this class package private instead of public if the class org.apache.logging.log4j.core.jackson.MarkerMixIn is moved to this package and would of course stay in its current module.
| Constructor and Description |
|---|
Log4jMarker(String
Constructs a new Marker.
|
| Modifier and Type | Method and Description |
|---|---|
Marker |
addParents(Marker
Adds a Marker as a parent to this Marker.
|
boolean |
equals(Object
Returns true if the given marker has the same name as this marker.
|
String |
getName()
Returns the name of this Marker.
|
Marker |
getParents()
Returns a list of parents of this Marker.
|
int |
hashCode()
Returns a hash code value based on the name of this marker.
|
boolean |
hasParents()
Indicates whether this Marker has references to any other Markers.
|
boolean |
isInstanceOf(Marker
Checks whether this Marker is an instance of the specified Marker.
|
boolean |
isInstanceOf(String
Checks whether this Marker is an instance of the specified Marker.
|
boolean |
remove(Marker
Removes the specified Marker as a parent of this Marker.
|
Marker |
setParents(Marker
Replaces the set of parent Markers with the provided Markers.
|
String |
toString()
|
public Log4jMarker(Stringname)
name - the name of the Marker.
IllegalArgumentException - if the argument is
null
public MarkeraddParents(Marker ... parentMarkers)
Marker
addParents in interface
Marker
parentMarkers - The parent markers to add.
public boolean remove(Markerparent)
Marker
public MarkersetParents(Marker ... markers)
Marker
setParents in interface
Marker
markers - The new set of parent Markers or
null to clear the parents.
public StringgetName()
Marker
public Marker[] getParents()
Marker
getParents in interface
Marker
null if this Marker has no parents.
public boolean hasParents()
Marker
hasParents in interface
Marker
true if the Marker has parent Markers
public boolean isInstanceOf(Markermarker)
Marker
isInstanceOf in interface
Marker
marker - The Marker to check.
true if this Marker or one of its ancestors is the specified Marker,
false otherwise.
public boolean isInstanceOf(StringmarkerName)
Marker
isInstanceOf in interface
Marker
markerName - The name of the Marker.
true if this Marker or one of its ancestors matches the specified name,
false otherwise.
public boolean equals(Objecto)
Marker
public int hashCode()
Marker
public StringtoString()