Class DefaultCode

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean addScope​(java.util.List<java.lang.Object> scopes, java.lang.Object scope)  
      void append​(java.lang.String text)  
      protected java.io.Writer appendText​(java.io.Writer writer)  
      java.lang.Object clone()  
      java.lang.Object clone​(java.util.Set<Code> seen)  
      java.io.Writer execute​(java.io.Writer writer, java.util.List<java.lang.Object> scopes)
      The default behavior is to run the codes and append the captured text.
      protected void filterText()  
      java.lang.Object get​(java.util.List<java.lang.Object> scopes)  
      Code[] getCodes()  
      java.lang.String getName()  
      void identity​(java.io.Writer writer)  
      void init()  
      Node invert​(Node node, java.lang.String text, java.util.concurrent.atomic.AtomicInteger position)  
      protected Node matchAppended​(Node node, java.lang.String text, java.util.concurrent.atomic.AtomicInteger position, int start)  
      protected java.io.Writer run​(java.io.Writer writer, java.util.List<java.lang.Object> scopes)  
      protected void runIdentity​(java.io.Writer writer)  
      void setCodes​(Code[] newcodes)  
      protected void tag​(java.io.Writer writer, java.lang.String tag)  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • appended

        protected java.lang.String appended
      • name

        protected final java.lang.String name
      • type

        protected final java.lang.String type
      • returnThis

        protected final boolean returnThis
      • binding

        protected final Binding binding
      • appendedChars

        private char[] appendedChars
    • Method Detail

      • clone

        public java.lang.Object clone()
        Specified by:
        clone in interface Code
        Overrides:
        clone in class java.lang.Object
      • clone

        public java.lang.Object clone​(java.util.Set<Code> seen)
        Specified by:
        clone in interface Code
      • invert

        public Node invert​(Node node,
                           java.lang.String text,
                           java.util.concurrent.atomic.AtomicInteger position)
        Specified by:
        invert in interface Code
      • matchAppended

        protected Node matchAppended​(Node node,
                                     java.lang.String text,
                                     java.util.concurrent.atomic.AtomicInteger position,
                                     int start)
      • getCodes

        public Code[] getCodes()
        Specified by:
        getCodes in interface Code
      • init

        public void init()
        Specified by:
        init in interface Code
      • filterText

        protected void filterText()
      • setCodes

        public void setCodes​(Code[] newcodes)
        Specified by:
        setCodes in interface Code
      • get

        public java.lang.Object get​(java.util.List<java.lang.Object> scopes)
      • execute

        public java.io.Writer execute​(java.io.Writer writer,
                                      java.util.List<java.lang.Object> scopes)
        The default behavior is to run the codes and append the captured text.
        Specified by:
        execute in interface Code
        Parameters:
        writer - The writer to write the output to
        scopes - The scopes to evaluate the embedded names against.
      • identity

        public void identity​(java.io.Writer writer)
        Specified by:
        identity in interface Code
      • runIdentity

        protected void runIdentity​(java.io.Writer writer)
      • tag

        protected void tag​(java.io.Writer writer,
                           java.lang.String tag)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • appendText

        protected java.io.Writer appendText​(java.io.Writer writer)
      • run

        protected java.io.Writer run​(java.io.Writer writer,
                                     java.util.List<java.lang.Object> scopes)
      • append

        public void append​(java.lang.String text)
        Specified by:
        append in interface Code
      • addScope

        protected boolean addScope​(java.util.List<java.lang.Object> scopes,
                                   java.lang.Object scope)
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Code