Enum TagOpt

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

    public enum TagOpt
    extends java.lang.Enum<TagOpt>
    Specification of annotated tag behavior during fetch.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AUTO_FOLLOW
      Automatically follow tags if we fetch the thing they point at.
      FETCH_TAGS
      Always fetch tags, even if we do not have the thing it points at.
      NO_TAGS
      Never fetch tags, even if we have the thing it points at.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String option  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private TagOpt​(java.lang.String o)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static TagOpt fromOption​(java.lang.String o)
      Convert a command line/configuration file text into a value instance.
      java.lang.String option()
      Get the command line/configuration file text for this value.
      static TagOpt valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static TagOpt[] 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

      • AUTO_FOLLOW

        public static final TagOpt AUTO_FOLLOW
        Automatically follow tags if we fetch the thing they point at.

        This is the default behavior and tries to balance the benefit of having an annotated tag against the cost of possibly objects that are only on branches we care nothing about. Annotated tags are fetched only if we can prove that we already have (or will have when the fetch completes) the object the annotated tag peels (dereferences) to.

      • NO_TAGS

        public static final TagOpt NO_TAGS
        Never fetch tags, even if we have the thing it points at.

        This option must be requested by the user and always avoids fetching annotated tags. It is most useful if the location you are fetching from publishes annotated tags, but you are not interested in the tags and only want their branches.

      • FETCH_TAGS

        public static final TagOpt FETCH_TAGS
        Always fetch tags, even if we do not have the thing it points at.

        Unlike AUTO_FOLLOW the tag is always obtained. This may cause hundreds of megabytes of objects to be fetched if the receiving repository does not yet have the necessary dependencies.

    • Field Detail

      • option

        private final java.lang.String option
    • Constructor Detail

      • TagOpt

        private TagOpt​(java.lang.String o)
    • Method Detail

      • values

        public static TagOpt[] 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 (TagOpt c : TagOpt.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TagOpt 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
      • option

        public java.lang.String option()
        Get the command line/configuration file text for this value.
        Returns:
        text that appears in the configuration file to activate this.
      • fromOption

        public static TagOpt fromOption​(java.lang.String o)
        Convert a command line/configuration file text into a value instance.
        Parameters:
        o - the configuration file text value.
        Returns:
        the option that matches the passed parameter.