Enum Discovery

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Discovery>

    public enum Discovery
    extends java.lang.Enum<Discovery>
    Determines how and if plugins are discovered from the class path.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALL
      Attempts discovery of plugins even if they are explicitly registered.
      EMPTY
      Only discovers plugins if no plugin was explicitly registered.
      NONE
      Does never discover plugins.
      UNIQUE
      Attempts discovery of plugins but does not discover plugins that are explicitly registered.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean recordConfiguration
      true if explicit configurations should be recorded.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Discovery​(boolean recordConfiguration)
      Creates a new discovery configuration.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract boolean isDiscover​(java.util.List<ByteBuddyMojo.Transformer> transformers)
      Determines if plugins should be discovered from the class path.
      protected boolean isRecordConfiguration()
      Returns true if explicit configurations should be recorded.
      static Discovery valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Discovery[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • ALL

        public static final Discovery ALL
        Attempts discovery of plugins even if they are explicitly registered.
      • UNIQUE

        public static final Discovery UNIQUE
        Attempts discovery of plugins but does not discover plugins that are explicitly registered.
      • EMPTY

        public static final Discovery EMPTY
        Only discovers plugins if no plugin was explicitly registered. This is the default configuration.
      • NONE

        public static final Discovery NONE
        Does never discover plugins.
    • Field Detail

      • recordConfiguration

        private final boolean recordConfiguration
        true if explicit configurations should be recorded.
    • Constructor Detail

      • Discovery

        private Discovery​(boolean recordConfiguration)
        Creates a new discovery configuration.
        Parameters:
        recordConfiguration - true if explicit configurations should be recorded.
    • Method Detail

      • values

        public static Discovery[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Discovery c : Discovery.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Discovery valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isRecordConfiguration

        protected boolean isRecordConfiguration()
        Returns true if explicit configurations should be recorded.
        Returns:
        true if explicit configurations should be recorded.
      • isDiscover

        protected abstract boolean isDiscover​(java.util.List<ByteBuddyMojo.Transformer> transformers)
        Determines if plugins should be discovered from the class path.
        Parameters:
        transformers - The configured transformers.
        Returns:
        true if plugins should be discovered from the class path.