Package sc.parser

Class BaseRebuildCtx

  • Direct Known Subclasses:
    GenerateContext, SaveRestoreCtx

    public abstract class BaseRebuildCtx
    extends java.lang.Object
    Used for both GenerateContext and RestoreContext to hold features used by those operations that work top-down. Specifically, ChainResultSequence rely on certain model properties being 'null' during the time we parse them, so that we know which path to take. When we have a fully build model object, in order to find the proper path down the parselet tree to rebuild the parse-node tree, we mask these properties so they are not visible - return null - to the logic checking for the next slot value. The mask is added before we restore/generate the child, and cleared afterwards.
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseRebuildCtx()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getPropertyValue​(java.lang.Object parent, java.lang.Object mapping)  
      void maskProperty​(java.lang.Object obj, java.lang.Object mapping, java.lang.Object value)  
      java.lang.String toString()  
      void unmaskProperty​(java.lang.Object obj, java.lang.Object mapping)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BaseRebuildCtx

        public BaseRebuildCtx()
    • Method Detail

      • maskProperty

        public void maskProperty​(java.lang.Object obj,
                                 java.lang.Object mapping,
                                 java.lang.Object value)
      • unmaskProperty

        public void unmaskProperty​(java.lang.Object obj,
                                   java.lang.Object mapping)
      • getPropertyValue

        public java.lang.Object getPropertyValue​(java.lang.Object parent,
                                                 java.lang.Object mapping)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object