Package org.sonar.api.resources
Class AbstractLanguage
- java.lang.Object
-
- org.sonar.api.resources.AbstractLanguage
-
-
Constructor Summary
Constructors Constructor Description AbstractLanguage(java.lang.String key)Better to use AbstractLanguage(key, name).AbstractLanguage(java.lang.String key, java.lang.String name)Should be the constructor used to build an AbstractLanguage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetKey()For example "java".java.lang.StringgetName()For example "Java"inthashCode()voidsetName(java.lang.String name)Sets the language namejava.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.sonar.api.resources.Language
filenamePatterns, getFileSuffixes, publishAllFiles
-
-
-
-
Constructor Detail
-
AbstractLanguage
public AbstractLanguage(java.lang.String key)
Better to use AbstractLanguage(key, name). In this case, key and name will be the same- Parameters:
key- The key of the language. Must not be more than 20 chars.
-
AbstractLanguage
public AbstractLanguage(java.lang.String key, java.lang.String name)Should be the constructor used to build an AbstractLanguage.- Parameters:
key- the key that will be used to retrieve the language. Must not be more than 20 chars. This key is important as it will be used to teint rules repositories...name- the display name of the language in the interface
-
-
Method Detail
-
getKey
public java.lang.String getKey()
For example "java". Should not be more than 20 chars.
-
getName
public java.lang.String getName()
For example "Java"
-
setName
public void setName(java.lang.String name)
Sets the language name
-
equals
public boolean equals(java.lang.Object o)
- 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
-
-