Class ActivationOS

java.lang.Object
org.apache.maven.api.model.ActivationOS
All Implemented Interfaces:
Serializable, InputLocationTracker

This is an activator which will detect an operating system's attributes in order to activate its profile.
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      The name of the operating system to be used to activate the profile. This must be an exact match of the ${os.name} Java property, such as Windows XP.
      Returns:
      a String
    • getFamily

      public String getFamily()
      The general family of the OS to be used to activate the profile, such as windows or unix.
      Returns:
      a String
    • getArch

      public String getArch()
      The architecture of the operating system to be used to activate the profile.
      Returns:
      a String
    • getVersion

      public String getVersion()
      The version of the operating system to be used to activate the profile.
      Returns:
      a String
    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • getLocationKeys

      public Set<Object> getLocationKeys()
      Gets the keys of the locations of the input source.
    • getLocationKeyStream

      protected Stream<Object> getLocationKeyStream()
    • getImportedFrom

      public InputLocation getImportedFrom()
      Gets the input location that caused this model to be read.
      Specified by:
      getImportedFrom in interface InputLocationTracker
      Returns:
      InputLocation
    • with

      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withName

      @Nonnull public ActivationOS withName(String name)
      Creates a new ActivationOS instance using the specified name.
      Parameters:
      name - the new String to use
      Returns:
      a ActivationOS with the specified name
    • withFamily

      @Nonnull public ActivationOS withFamily(String family)
      Creates a new ActivationOS instance using the specified family.
      Parameters:
      family - the new String to use
      Returns:
      a ActivationOS with the specified family
    • withArch

      @Nonnull public ActivationOS withArch(String arch)
      Creates a new ActivationOS instance using the specified arch.
      Parameters:
      arch - the new String to use
      Returns:
      a ActivationOS with the specified arch
    • withVersion

      @Nonnull public ActivationOS withVersion(String version)
      Creates a new ActivationOS instance using the specified version.
      Parameters:
      version - the new String to use
      Returns:
      a ActivationOS with the specified version
    • newInstance

      @Nonnull public static ActivationOS newInstance()
      Creates a new ActivationOS instance. Equivalent to newInstance(true).
      Returns:
      a new ActivationOS
      See Also:
    • newInstance

      @Nonnull public static ActivationOS newInstance(boolean withDefaults)
      Creates a new ActivationOS instance using default values or not. Equivalent to newBuilder(withDefaults).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new ActivationOS
    • newBuilder

      @Nonnull public static ActivationOS.Builder newBuilder()
      Creates a new ActivationOS builder instance. Equivalent to newBuilder(true).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static ActivationOS.Builder newBuilder(boolean withDefaults)
      Creates a new ActivationOS builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static ActivationOS.Builder newBuilder(ActivationOS from)
      Creates a new ActivationOS builder instance using the specified object as a basis. Equivalent to newBuilder(from, false).
      Parameters:
      from - the ActivationOS instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static ActivationOS.Builder newBuilder(ActivationOS from, boolean forceCopy)
      Creates a new ActivationOS builder instance using the specified object as a basis.
      Parameters:
      from - the ActivationOS instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder