目录

CLASS info
public class Scope implements IMessageEntity, Parcelable
Describes the authorization request for OAuth2.0, which affects user security. When authorization is requested, an authorization dialog box is displayed.

Public Constructor Summary

Constructor name
public Scope()
Creates a new scope.
public Scope(String scopeUri)
Creates a new scope using the specified URI.

Public Method Summary

Return typeMethod name
StringgetScopeUri()
booleanequals(Object o) ()
intdescribeContents()
voidwriteToParcel(Parcel parcel, int i)
int hashCode()
StringtoString()

Public Constructors

constructor
public Scope()
Creates a new scope.
constructor
public Scope(String scopeUri)
Creates a new scope using the specified URI.

Parameters

Parameter nameParameter desc
scopeUriURI of the scope.
scopeUri sample description:
profile: The basic information of HUAWEI ID, such as head sculpture, nicknames, etc.
email: The email of HUAWEI ID.
openid: The openid of HUAWEI ID.
https://www.huawei.com/auth/games: The special scope of games.

Public Methods

Method
public String getScopeUri()
Obtain the authorization URI corresponding to the current scope.

Return

typedesc
StringReturns the authorization URI corresponding to the current scope.
Method
public boolean equals(Object o)
Determines whether two instances are equal.

Parameters

Parameter nameParameter desc
oObjects to be compared.

Return

typedesc
booleanComparison result: equal if true, and unequal if false.
Method
public int describeContents()
used in serialization and deserialization.
Method
public void writeToParcel(Parcel parcel, int i)
used in serialization and deserialization.
Method
public final int hashCode()
hashCode of a compute instance.
Method
public final String toString()
Constructs and outputs the string of an instance.