Interface ApplicationComponent

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.String getDebugName()
      A debug name for this component, used in developer mode to e.g.
      DesignerRoot getDesignerRoot()  
      default net.sourceforge.pmd.lang.LanguageVersion getGlobalLanguageVersion()  
      default LogEntry.Category getLogCategory()
      A default category for exceptions coming from this component.
      default EventLogger getLogger()
      Gets the logger of the application.
      default javafx.stage.Stage getMainStage()
      Gets the main stage of the application.
      default <T> T getService​(AppServiceDescriptor<T> descriptor)  
      default org.reactfx.value.Val<@NonNull net.sourceforge.pmd.lang.Language> globalLanguageProperty()
      The language is now global to the app.
      default boolean isDeveloperMode()
      If true, some more events are pushed to the event log, and console streams are open.
      default void logInternalDebugInfo​(java.util.function.Supplier<java.lang.String> shortMessage, java.util.function.Supplier<java.lang.String> details)
      Logs an exception that occurred somewhere in the app logic.
      default void logInternalDebugInfo​(java.util.function.Supplier<java.lang.String> shortMessage, java.util.function.Supplier<java.lang.String> details, boolean trace)
      Logs an exception that occurred somewhere in the app logic.
      default void logInternalException​(java.lang.Throwable throwable)
      Logs an exception that occurred somewhere in the app logic.
      default void logUserException​(java.lang.Throwable throwable, LogEntry.Category category)
      Notify the logger of an exception that somewhere in PMD logic.
      default void raiseParsableSourceFlag​(java.util.function.Supplier<java.lang.String> details)
      Notify the logger that source code parsing succeeded and that the last recent failure may be thrown away.
      default void raiseParsableXPathFlag()
      Notify the logger that XPath parsing succeeded and that the last recent failure may be thrown away.
    • Method Detail

      • getGlobalLanguageVersion

        default net.sourceforge.pmd.lang.LanguageVersion getGlobalLanguageVersion()
      • globalLanguageProperty

        default org.reactfx.value.Val<@NonNull net.sourceforge.pmd.lang.Language> globalLanguageProperty()
        The language is now global to the app.
      • getLogger

        default EventLogger getLogger()
        Gets the logger of the application. Events pushed to the logger are filtered then forwarded to the Event Log control.
        Returns:
        The logger
      • getDebugName

        default java.lang.String getDebugName()
        A debug name for this component, used in developer mode to e.g. trace events handling paths.
      • getLogCategory

        default LogEntry.Category getLogCategory()
        A default category for exceptions coming from this component.
      • getMainStage

        default javafx.stage.Stage getMainStage()
        Gets the main stage of the application.
      • isDeveloperMode

        default boolean isDeveloperMode()
        If true, some more events are pushed to the event log, and console streams are open. This is enabled by the -v or --verbose option on command line for now.
      • logUserException

        default void logUserException​(java.lang.Throwable throwable,
                                      LogEntry.Category category)
        Notify the logger of an exception that somewhere in PMD logic. Exceptions raised by the app logic are considered internal and should be forwarded to the logger using logInternalException(Throwable). If we're not in developer mode they will be ignored.
      • raiseParsableXPathFlag

        default void raiseParsableXPathFlag()
        Notify the logger that XPath parsing succeeded and that the last recent failure may be thrown away. Only logged in developer mode.
      • raiseParsableSourceFlag

        default void raiseParsableSourceFlag​(java.util.function.Supplier<java.lang.String> details)
        Notify the logger that source code parsing succeeded and that the last recent failure may be thrown away. Only logged in developer mode.
      • logInternalException

        default void logInternalException​(java.lang.Throwable throwable)
        Logs an exception that occurred somewhere in the app logic.
      • logInternalDebugInfo

        default void logInternalDebugInfo​(java.util.function.Supplier<java.lang.String> shortMessage,
                                          java.util.function.Supplier<java.lang.String> details)
        Logs an exception that occurred somewhere in the app logic.
      • logInternalDebugInfo

        default void logInternalDebugInfo​(java.util.function.Supplier<java.lang.String> shortMessage,
                                          java.util.function.Supplier<java.lang.String> details,
                                          boolean trace)
        Logs an exception that occurred somewhere in the app logic.