| CLASS info |
| public class Scope implements IMessageEntity, Parcelable |
| 描述一个OAuth2.0的请求授权,对用户安全有影响,当请求授权时,会产生一个授权对话框。 |
| Constructor name |
| public Scope() 默认的构造方法,创建一个新的Scope。 |
| public Scope(String scopeUri) 使用指定URI创建一个新的Scope。 |
| Return type | Method name |
| String | getScopeUri() |
| boolean | equals(Object o) () |
| int | describeContents() |
| void | writeToParcel(Parcel parcel, int i) |
| int | hashCode() |
| String | toString() |
| constructor |
public Scope() |
| 默认的构造方法,创建一个新的Scope。 |
| constructor |
public Scope(String scopeUri) |
| 使用指定URI创建一个新的Scope。 |
Parameters
| Parameter name | Parameter desc |
| scopeUri | 授权资源的URI scopeUri样例描述: profile:华为帐号的基本信息,例如头像、昵称等。 email:华为帐号的email。 openid:华为帐号的openid。 https://www.huawei.com/auth/games:游戏的专用Scope。 |
| Method |
public String getScopeUri() |
| 获取当前Scope对应的授权URI。 |
Return
| type | desc |
| String | 返回当前Scope对应的授权URI。 |
| Method |
public boolean equals(Object o) |
| 判断两个实例是否相等。 |
Parameters
| Parameter name | Parameter desc |
| o | 待比较的对象 |
Return
| type | desc |
| boolean | true:两个Scope相同 false:两个Scope不同 |
| Method |
public int describeContents() |
| 该方法在序列化和反序列化时使用。 |
Return
| type | desc |
| int | 返回0 |
| Method |
public void writeToParcel(Parcel parcel, int i) |
| 该方法在序列化和反序列化时使用。 |
Parameters
| Parameter name | Parameter desc |
| parcel | parcel对象 |
| i | 标记 |
| Method |
public final int hashCode() |
| 重写java.lang.Object基类方法,计算Scope对象的hashCode。 |
Return
| type | desc |
| int | hash code值。 |
| Method |
public final String toString() |
| 重写java.lang.Object基类方法,转换为字符串。 |
Return
| type | desc |
| String | 转换后的字符串 |