Package hydra.build.format
Class LanguageProfile
- java.lang.Object
-
- hydra.build.format.LanguageProfile
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<LanguageProfile>
public class LanguageProfile extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<LanguageProfile>
The build identity of a source/target language: how the build system treats it. See https://github.com/CategoricalData/hydra/issues/559- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLanguageProfile.BuilderA fluent builder forLanguageProfile.
-
Field Summary
Fields Modifier and Type Field Description static NameCODER_PACKAGEName of thehydra.build.format.LanguageProfile.coderPackagefield.java.lang.StringcoderPackageThe distribution package the language's coder lives in (the four Lisp dialects share hydra-lisp)java.lang.StringfamilyThe build-treatment group the language belongs to, e.g.static NameFAMILYName of thehydra.build.format.LanguageProfile.familyfield.java.lang.StringnameThe canonical language token, e.g.static NameNAMEName of thehydra.build.format.LanguageProfile.namefield.static NameTYPE_Name of thehydra.build.format.LanguageProfiletype.
-
Constructor Summary
Constructors Constructor Description LanguageProfile(java.lang.String name, java.lang.String coderPackage, java.lang.String family)Constructs an immutableLanguageProfile.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LanguageProfile.Builderbuilder()Creates a new fluent builder forLanguageProfile.intcompareTo(LanguageProfile other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()LanguageProfilewithCoderPackage(java.lang.String coderPackage)Returns a copy of thisLanguageProfilewithcoderPackagereplaced.LanguageProfilewithFamily(java.lang.String family)Returns a copy of thisLanguageProfilewithfamilyreplaced.LanguageProfilewithName(java.lang.String name)Returns a copy of thisLanguageProfilewithnamereplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.build.format.LanguageProfiletype.
-
NAME
public static final Name NAME
Name of thehydra.build.format.LanguageProfile.namefield.
-
CODER_PACKAGE
public static final Name CODER_PACKAGE
Name of thehydra.build.format.LanguageProfile.coderPackagefield.
-
FAMILY
public static final Name FAMILY
Name of thehydra.build.format.LanguageProfile.familyfield.
-
name
public final java.lang.String name
The canonical language token, e.g. "haskell", "java", "clojure"
-
coderPackage
public final java.lang.String coderPackage
The distribution package the language's coder lives in (the four Lisp dialects share hydra-lisp)
-
family
public final java.lang.String family
The build-treatment group the language belongs to, e.g. "jvm", "python", "lisp" (an open string: adding a host must not edit a type)
-
-
Constructor Detail
-
LanguageProfile
public LanguageProfile(java.lang.String name, java.lang.String coderPackage, java.lang.String family)Constructs an immutableLanguageProfile.- Parameters:
name- The canonical language token, e.g. "haskell", "java", "clojure"coderPackage- The distribution package the language's coder lives in (the four Lisp dialects share hydra-lisp)family- The build-treatment group the language belongs to, e.g. "jvm", "python", "lisp" (an open string: adding a host must not edit a type)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(LanguageProfile other)
- Specified by:
compareToin interfacejava.lang.Comparable<LanguageProfile>
-
withName
public LanguageProfile withName(java.lang.String name)
Returns a copy of thisLanguageProfilewithnamereplaced.
-
withCoderPackage
public LanguageProfile withCoderPackage(java.lang.String coderPackage)
Returns a copy of thisLanguageProfilewithcoderPackagereplaced.
-
withFamily
public LanguageProfile withFamily(java.lang.String family)
Returns a copy of thisLanguageProfilewithfamilyreplaced.
-
builder
public static LanguageProfile.Builder builder()
Creates a new fluent builder forLanguageProfile.
-
-