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 boolean
equals(java.lang.Object o)
java.lang.String
getKey()
For example "java".java.lang.String
getName()
For example "Java"int
hashCode()
void
setName(java.lang.String name)
Sets the language namejava.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.sonar.api.resources.Language
getFileSuffixes
-
-
-
-
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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-