AndroidJavaObject.GetStatic.<FieldType> 获取静态域类型


function GetStatic.<FieldType> (fieldName : string) : FieldType

Parameters参数

  • fieldName
    The name of the field (e.g. int counter; would have fieldName = "counter")
       域的名称。

Description描述

Get the value of a static field in an object type.

获取一个对象类型上的静态域值。

The generic parameter determines the field type.

一般参数定义域类型。

// Create an object of user provided class org.example.StaticFields,// and get the string value of field 'globalName'.//创建一个用户提供 
的类对象org.example.StaticFields//并获取域globalName的字符串值
function Start() {var jo = new AndroidJavaObject("org.example.StaticFields");var globalName = jo.Get.<string>("globalName");}


,