Android

Android Annotation Summary

Darane 2021. 9. 7. 09:17

Android Annotation Summary

Annotation is structured metadata that can be added to Java source code.


@Nullable : null can be assigned to the parameter.

@NonNull : null is not assigned to the parameter.

@StringRes : Parameter refers to the resource R.string.

@DrawableRes : Parameter refers to the resource R.drawable.

@DimenRes : Parameter refers to resource R.dimen.

@ColorRes : Parameter refers to resource R.color.

@InterpolatorRes : Parameter refers to resource R.interpolator.

@AnyRes : Parameter refers to resource R.

@ColorInt : Parameter refers to a color integer.

@MainThread : Method operates on the main thread.

@UiThread : Method works on Ui Thread.

@WorkerThread : Method works on Worker Thread.

@BinderThread : Method is running on Binder Thread.

@AnyThread : Method works on any thread.

@IntRange : Specifies the range of int parameters.

@FloatRange : Specifies the range of float parameters.

@Size : Specify the size of the parameter array or the length of the String.

@RequiresPermission : Permission to use API.

@CheckResult : Check if the result value of the method is actually used.

@CallSuper : Check if the override method calls the parent(Super) implementation.

반응형