Class JacocoProfile

  • All Implemented Interfaces:
    com.oracle.bedrock.Option, com.oracle.bedrock.runtime.Profile

    public class JacocoProfile
    extends java.lang.Object
    implements com.oracle.bedrock.runtime.Profile, com.oracle.bedrock.Option
    The Java Code Coverage (JaCoCo) Profile.

    Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
    Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

    Author:
    Brian Oliver
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.oracle.bedrock.Option

        com.oracle.bedrock.Option.Collectable, com.oracle.bedrock.Option.Collector<C extends com.oracle.bedrock.Option.Collectable,​T extends com.oracle.bedrock.Option.Collector<C,​T>>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static JacocoProfile disabled()
      Create a JacocoProfile with coverage disabled.
      static JacocoProfile enabled​(java.lang.String parameters)
      Create a JacocoProfile.
      static JacocoProfile fromSystemProperty()
      Create a JacocoProfile with the destination configured from System properties.
      static JacocoProfile fromSystemProperty​(java.lang.String extraParams)
      Create a JacocoProfile with the destination configured from System properties.
      void onClosing​(com.oracle.bedrock.runtime.Platform platform, com.oracle.bedrock.runtime.Application application, com.oracle.bedrock.OptionsByType optionsByType)  
      void onLaunched​(com.oracle.bedrock.runtime.Platform platform, com.oracle.bedrock.runtime.Application application, com.oracle.bedrock.OptionsByType optionsByType)  
      void onLaunching​(com.oracle.bedrock.runtime.Platform platform, com.oracle.bedrock.runtime.MetaClass metaClass, com.oracle.bedrock.OptionsByType optionsByType)  
      • Methods inherited from class java.lang.Object

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

      • JacocoProfile

        @Default
        public JacocoProfile​(java.lang.String parameters)
        Constructs a JacocoProfile.
        Parameters:
        parameters - the parameters provided to the JacocoProfile
      • JacocoProfile

        public JacocoProfile​(java.lang.String parameters,
                             boolean enabled)
        Constructs a JacocoProfile.
        Parameters:
        parameters - the parameters provided to the JacocoProfile
        enabled - whether coverage should be enabled
    • Method Detail

      • enabled

        public static JacocoProfile enabled​(java.lang.String parameters)
        Create a JacocoProfile.
        Parameters:
        parameters - the Jacoco parameters
        Returns:
        a Jacoco profile with the specified parameters
      • disabled

        public static JacocoProfile disabled()
        Create a JacocoProfile with coverage disabled.
        Returns:
        a Jacoco profile with coverage disabled
      • fromSystemProperty

        public static JacocoProfile fromSystemProperty()
        Create a JacocoProfile with the destination configured from System properties.
        Returns:
        a Jacoco profile with the destination configured from System properties
      • fromSystemProperty

        public static JacocoProfile fromSystemProperty​(java.lang.String extraParams)
        Create a JacocoProfile with the destination configured from System properties.
        Returns:
        a Jacoco profile with the destination configured from System properties
      • onLaunching

        public void onLaunching​(com.oracle.bedrock.runtime.Platform platform,
                                com.oracle.bedrock.runtime.MetaClass metaClass,
                                com.oracle.bedrock.OptionsByType optionsByType)
        Specified by:
        onLaunching in interface com.oracle.bedrock.runtime.Profile
      • onLaunched

        public void onLaunched​(com.oracle.bedrock.runtime.Platform platform,
                               com.oracle.bedrock.runtime.Application application,
                               com.oracle.bedrock.OptionsByType optionsByType)
        Specified by:
        onLaunched in interface com.oracle.bedrock.runtime.Profile
      • onClosing

        public void onClosing​(com.oracle.bedrock.runtime.Platform platform,
                              com.oracle.bedrock.runtime.Application application,
                              com.oracle.bedrock.OptionsByType optionsByType)
        Specified by:
        onClosing in interface com.oracle.bedrock.runtime.Profile