sinceSdkVersion property
The version where this SDK API was added.
A @Since()
annotation can be applied to a library declaration,
any public declaration in a library, or in a class, or to an optional
parameter, etc.
The returned version is "effective", so that if a library is annotated then all elements of the library inherit it; or if a class is annotated then all members and constructors of the class inherit it.
If multiple @Since()
annotations apply to the same element, the latest
version takes precedence.
Returns null
if the element is not declared in SDK, or does not have
a @Since()
annotation applicable to it.
Implementation
@override
Version? get sinceSdkVersion {
if (!hasModifier(Modifier.HAS_SINCE_SDK_VERSION_COMPUTED)) {
setModifier(Modifier.HAS_SINCE_SDK_VERSION_COMPUTED, true);
var result = SinceSdkVersionComputer().compute(this);
if (result != null) {
_sinceSdkVersion[this] = result;
setModifier(Modifier.HAS_SINCE_SDK_VERSION_VALUE, true);
}
}
if (hasModifier(Modifier.HAS_SINCE_SDK_VERSION_VALUE)) {
return _sinceSdkVersion[this];
}
return null;
}