Class ASTManager


  • public class ASTManager
    extends java.lang.Object
    Main class of the model. Manages a compilation unit.
    Since:
    6.0.0
    Author:
    Clément Fournier
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<net.sourceforge.pmd.lang.ast.Node> getCompilationUnit()  
      net.sourceforge.pmd.lang.LanguageVersion getLanguageVersion()  
      org.reactfx.value.Var<net.sourceforge.pmd.lang.LanguageVersion> languageVersionProperty()  
      void setLanguageVersion​(net.sourceforge.pmd.lang.LanguageVersion version)  
      java.util.Optional<net.sourceforge.pmd.lang.ast.Node> updateIfChanged​(java.lang.String source, java.lang.ClassLoader classLoader)
      Refreshes the compilation unit given the current parameters of the model.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getLanguageVersion

        public net.sourceforge.pmd.lang.LanguageVersion getLanguageVersion()
      • setLanguageVersion

        public void setLanguageVersion​(net.sourceforge.pmd.lang.LanguageVersion version)
      • languageVersionProperty

        public org.reactfx.value.Var<net.sourceforge.pmd.lang.LanguageVersion> languageVersionProperty()
      • getCompilationUnit

        public java.util.Optional<net.sourceforge.pmd.lang.ast.Node> getCompilationUnit()
      • updateIfChanged

        public java.util.Optional<net.sourceforge.pmd.lang.ast.Node> updateIfChanged​(java.lang.String source,
                                                                                     java.lang.ClassLoader classLoader)
                                                                              throws ParseAbortedException
        Refreshes the compilation unit given the current parameters of the model.
        Parameters:
        source - Source code
        Throws:
        ParseAbortedException - if parsing fails and cannot recover