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.apache.logging.log4j
Class MarkerManager.Log4jMarker

    java.lang.Object
      org.apache.logging.log4j.MarkerManager.Log4jMarker

All Implemented Interfaces:
  Serializable, Marker

Enclosing class:
  MarkerManager

    public static class MarkerManager.Log4jMarker

extends Object
implements Marker

Consider this class private, it is only public to satisfy Jackson for XML and JSON IO.

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.

See Also:
  Serialized Form

Constructor Summary
`MarkerManager.Log4jMarker(String name)` Constructs a new Marker.

Method Summary
`Marker` | `addParents(Marker... parents)` Adds a Marker as a parent to this Marker.
`boolean` | `equals(Object o)`
`String` | `getName()` Returns the name of this Marker.
`Marker[]` | `getParents()` Returns a list of parents of this Marker.
`int` | `hashCode()`
`boolean` | `hasParents()` Indicates whether this Marker has references to any other Markers.
`boolean` | `isInstanceOf(Marker marker)` Checks whether this Marker is an instance of the specified Marker.
`boolean` | `isInstanceOf(String markerName)` Checks whether this Marker is an instance of the specified Marker.
`boolean` | `remove(Marker parent)` Removes the specified Marker as a parent of this Marker.
`Marker` | `setParents(Marker... markers)` Replaces the set of parent Markers with the provided Markers.
`String` | `toString()`

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

Constructor Detail

### MarkerManager.Log4jMarker

    public MarkerManager.Log4jMarker(String name)

  Constructs a new Marker.

  Parameters:
    `name` - the name of the Marker.
  Throws:
    `IllegalArgumentException` - if the argument is `null`

Method Detail

### addParents

    public Marker addParents(Marker... parents)

  Description copied from interface: `Marker`
  Adds a Marker as a parent to this Marker.

  Specified by:
    `addParents` in interface `Marker`
  Parameters:
    `parents` - The parent markers to add.
  Returns:
    The current Marker object, thus allowing multiple adds to be concatenated.

### remove

    public boolean remove(Marker parent)

  Description copied from interface: `Marker`
  Removes the specified Marker as a parent of this Marker.

  Specified by:
    `remove` in interface `Marker`
  Parameters:
    `parent` - The marker to remove.
  Returns:
    `true` if the marker was removed.

### setParents

    public Marker setParents(Marker... markers)

  Description copied from interface: `Marker`
  Replaces the set of parent Markers with the provided Markers.

  Specified by:
    `setParents` in interface `Marker`
  Parameters:
    `markers` - The new set of parent Markers or `null` to clear the parents.
  Returns:
    The current Marker object.

### getName

    public String getName()

  Description copied from interface: `Marker`
  Returns the name of this Marker.

  Specified by:
    `getName` in interface `Marker`
  Returns:
    The name of the Marker.

### getParents

    public Marker[] getParents()

  Description copied from interface: `Marker`
  Returns a list of parents of this Marker.

  Specified by:
    `getParents` in interface `Marker`
  Returns:
    The parent Markers or `null` if this Marker has no parents.

### hasParents

    public boolean hasParents()

  Description copied from interface: `Marker`
  Indicates whether this Marker has references to any other Markers.

  Specified by:
    `hasParents` in interface `Marker`
  Returns:
    `true` if the Marker has parent Markers

### isInstanceOf

    public boolean isInstanceOf(Marker marker)

  Description copied from interface: `Marker`
  Checks whether this Marker is an instance of the specified Marker.

  Specified by:
    `isInstanceOf` in interface `Marker`
  Parameters:
    `marker` - The Marker to check.
  Returns:
    `true` if this Marker or one of its ancestors is the specified Marker, `false` otherwise.

### isInstanceOf

    public boolean isInstanceOf(String markerName)

  Description copied from interface: `Marker`
  Checks whether this Marker is an instance of the specified Marker.

  Specified by:
    `isInstanceOf` in interface `Marker`
  Parameters:
    `markerName` - The name of the Marker.
  Returns:
    `true` if this Marker or one of its ancestors matches the specified name, `false` otherwise.

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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 © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.