Class PhantomNodeLogic

java.lang.Object
com.github.javaparser.printer.lexicalpreservation.PhantomNodeLogic

@Deprecated public class PhantomNodeLogic extends Object
Deprecated.
This class is no longer used phantom node are now an attribute of each node
We want to recognize and ignore "phantom" nodes, like the fake type of variable in FieldDeclaration
  • Field Details

    • LEVELS_TO_EXPLORE

      private static final int LEVELS_TO_EXPLORE
      Deprecated.
      See Also:
    • isPhantomNodeCache

      private static final Map<Node,Boolean> isPhantomNodeCache
      Deprecated.
    • cacheCleaner

      private static final AstObserver cacheCleaner
      Deprecated.
  • Constructor Details

    • PhantomNodeLogic

      public PhantomNodeLogic()
      Deprecated.
  • Method Details

    • isPhantomNode

      static boolean isPhantomNode(Node node)
      Deprecated.
    • inPhantomNode

      private static boolean inPhantomNode(Node node, int levels)
      Deprecated.
      A node contained in a phantom node is also a phantom node. We limit how many levels up we check just for performance reasons.
    • cleanUpCache

      public static void cleanUpCache()
      Deprecated.
      Clean up the cache used by the LexicalPreserving logic. This should only be used once you're done printing all parsed data with a JavaParser's configuration setLexicalPreservationEnabled=true.