com.android.builder.model
Interface ApiVersion
public interface ApiVersion
Represents the version of an Android Platform.
A version is defined by an API level and an optional code name.
Release versions of the Android platform are identified by their API level (integer),
(technically the code name for release version is "REL" but this class will return
null instead.)
Preview versions of the platform are identified by a code name. Their API level
is usually set to the value of the previous platform.
Method Summary |
int |
getApiLevel()
Returns the api level as an integer. |
java.lang.String |
getApiString()
Returns the API value as a string. |
java.lang.String |
getCodename()
Returns the version code name if applicable, null otherwise. |
getApiLevel
int getApiLevel()
- Returns the api level as an integer.
For target that are in preview mode, this can be superseded by
getCodename()
.
- See Also:
getCodename()
getCodename
@Nullable
java.lang.String getCodename()
- Returns the version code name if applicable, null otherwise.
If the codename is non null, then the API level should be ignored, and this should be
used as a unique identifier of the target instead.
getApiString
@NonNull
java.lang.String getApiString()
- Returns the API value as a string.
If there's a codename, this returns it, otherwise this returns the string version
of the integer api level.
- Returns:
- a String.