- java.lang.Object
-
- javax0.jamal.tools.Marker
-
- All Implemented Interfaces:
Marker
public class Marker extends java.lang.Object implements Marker
Implementation of theMarker
interface that requires that exactly the same objects is passed toMacroRegister.pop(javax0.jamal.api.Marker)
and toMacroRegister.push(javax0.jamal.api.Marker)
.An instance of this class is used to pass to the
push(Marker)
call and when we callpop(Marker)
the register checks that the same instance was passed. This is much stricter than comparing only thename
field. This is the reason why this class does not defineObject.equals(Object)
andObject.hashCode()
methods.When object identity cannot be guaranteed then the
NamedMarker
implementation of theMarker
interface has to be used. An example is the macro pairbegin
andend
. See their documentation atjavax0.jamal.builtins.Begin
andjavax0.jamal.builtins.End
.The
name
field in this implementation serves documentation purposes only and is included into the message of the exception that is thrown by the methodpop(Marker)
when the markers do not match.
-
-
Constructor Summary
Constructors Constructor Description Marker(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
-