目录

CLASS info
public class Scope implements IMessageEntity, Parcelable
描述一个OAuth2.0的请求授权,对用户安全有影响,当请求授权时,会产生一个授权对话框。

Public Constructor Summary

Constructor name
public Scope()
默认的构造方法,创建一个新的Scope。
public Scope(String scopeUri)
使用指定URI创建一个新的Scope。

Public Method Summary

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

Public Constructors

constructor
public Scope()
默认的构造方法,创建一个新的Scope。
constructor
public Scope(String scopeUri)
使用指定URI创建一个新的Scope。

Parameters

Parameter nameParameter desc
scopeUri授权资源的URI
scopeUri样例描述:
profile:华为帐号的基本信息,例如头像、昵称等。
email:华为帐号的email。
openid:华为帐号的openid。
https://www.huawei.com/auth/games:游戏的专用Scope。

Public Methods

Method
public String getScopeUri()
获取当前Scope对应的授权URI。

Return

typedesc
String返回当前Scope对应的授权URI。
Method
public boolean equals(Object o)
判断两个实例是否相等。

Parameters

Parameter nameParameter desc
o待比较的对象

Return

typedesc
booleantrue:两个Scope相同
false:两个Scope不同
Method
public int describeContents()
该方法在序列化和反序列化时使用。

Return

typedesc
int返回0
Method
public void writeToParcel(Parcel parcel, int i)
该方法在序列化和反序列化时使用。

Parameters

Parameter nameParameter desc
parcelparcel对象
i标记
Method
public final int hashCode()
重写java.lang.Object基类方法,计算Scope对象的hashCode。

Return

typedesc
inthash code值。
Method
public final String toString()
重写java.lang.Object基类方法,转换为字符串。

Return

typedesc
String转换后的字符串