RestrictTo
public
abstract
@interface
RestrictTo
implements
Annotation
android.support.annotation.RestrictTo |
Denotes that the annotated element should only be accessed from within a
specific scope (as defined by RestrictTo.Scope
).
Example of restricting usage within a library (based on gradle group ID):
@RestrictTo(GROUP_ID)
public void resetPaddingToInitialValues() { ...
@RestrictScope(TESTS)
public abstract int getUserId();
@RestrictScope(SUBCLASSES)
public void onDrawForeground(Canvas canvas) { ...
Summary
Nested classes | |
---|---|
enum |
RestrictTo.Scope
|
Public methods
Annotations
- AnimatorRes
- AnimRes
- AnyRes
- AnyThread
- ArrayRes
- AttrRes
- BinderThread
- BoolRes
- CallSuper
- CheckResult
- ColorInt
- ColorLong
- ColorRes
- DimenRes
- Dimension
- DrawableRes
- FloatRange
- FontRes
- FractionRes
- GuardedBy
- HalfFloat
- IdRes
- IntDef
- IntegerRes
- InterpolatorRes
- IntRange
- Keep
- LayoutRes
- LongDef
- MainThread
- MenuRes
- NavigationRes
- NonNull
- Nullable
- PluralsRes
- Px
- RawRes
- RequiresApi
- RequiresPermission
- RequiresPermission.Read
- RequiresPermission.Write
- RestrictTo
- Size
- StringDef
- StringRes
- StyleableRes
- StyleRes
- TransitionRes
- UiThread
- VisibleForTesting
- WorkerThread
- XmlRes
Enums