Class BuildTarget

    • Method Detail

      • getBaseName

        public BaseName getBaseName()
      • getShortName

        public String getShortName()
      • getShortNameAndFlavorPostfix

        public String getShortNameAndFlavorPostfix()
        If this build target were cell//third_party/java/guava:guava-latest, then this would return "guava-latest". Note that the flavor of the target is included here.
      • getFlavorPostfix

        public String getFlavorPostfix()
        An empty string when there are no flavors, or hash followed by comma-separated flavors.
      • getFlavorsAsString

        protected String getFlavorsAsString()
      • getFullyQualifiedName

        public String getFullyQualifiedName()
        If this build target is cell//third_party/java/guava:guava-latest, then this would return "cell//third_party/java/guava:guava-latest".
      • getCellRelativeName

        public String getCellRelativeName()
        If this build target is cell//third_party/java/guava:guava-latest, then this would return "//third_party/java/guava:guava-latest".
      • isFlavored

        public boolean isFlavored()
      • toStringWithConfiguration

        public String toStringWithConfiguration()
        Target name and configuration.
      • assertUnflavored

        public BuildTarget assertUnflavored()
        Verifies that this build target has no flavors.
        Returns:
        this build target
        Throws:
        IllegalStateException - if a build target has flavors
      • withoutFlavors

        public BuildTarget withoutFlavors()
        A copy of this build target but without any flavors.
      • withAppendedFlavors

        public BuildTarget withAppendedFlavors​(Flavor... flavors)
      • withUnflavoredBuildTarget

        public BuildTarget withUnflavoredBuildTarget​(UnflavoredBuildTarget target)
        Keep flavors and configuration, replace everything else.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object