当前位置: 首页>>代码示例>>Java>>正文


Java Getter类代码示例

本文整理汇总了Java中jdk.nashorn.internal.objects.annotations.Getter的典型用法代码示例。如果您正苦于以下问题:Java Getter类的具体用法?Java Getter怎么用?Java Getter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Getter类属于jdk.nashorn.internal.objects.annotations包,在下文中一共展示了Getter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: length

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Length getter
 * @param self self reference
 * @return length property value
 */
@Getter(attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_CONFIGURABLE)
public static Object length(final Object self) {
    if (self instanceof ScriptObject) {
        return JSType.toUint32(((ScriptObject)self).getArray().length());
    }

    return 0;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:NativeRegExpExecResult.java

示例2: length

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Length getter
 * @param self self reference
 * @return the length of the object
 */
@Getter(attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_CONFIGURABLE)
public static Object length(final Object self) {
    if (isArray(self)) {
        return JSType.toUint32(((ScriptObject) self).getArray().length());
    }

    return 0;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:NativeArray.java

示例3: length

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Length getter
 * @param self self reference
 * @return length property value
 */
@Getter(attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_CONFIGURABLE)
public static Object length(final Object self) {
    if (self instanceof ScriptObject) {
        return (double) JSType.toUint32(((ScriptObject)self).getArray().length());
    }

    return 0;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:NativeRegExpExecResult.java

示例4: getDate

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for ECMA 15.1.4.7 Date property
 *
 * @param self self reference
 * @return Date property value
 */
@Getter(name = "Date", attributes = Attribute.NOT_ENUMERABLE)
public static Object getDate(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.date == LAZY_SENTINEL) {
        global.date = global.getBuiltinDate();
    }
    return global.date;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:Global.java

示例5: getRegExp

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for ECMA 15.1.4.8 RegExp property
 *
 * @param self self reference
 * @return RegExp property value
 */
@Getter(name = "RegExp", attributes = Attribute.NOT_ENUMERABLE)
public static Object getRegExp(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.regexp == LAZY_SENTINEL) {
        global.regexp = global.getBuiltinRegExp();
    }
    return global.regexp;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:Global.java

示例6: getJSON

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for ECMA 15.12 - The JSON property
 * @param self self reference
 * @return the value of JSON property
 */
@Getter(name = "JSON", attributes = Attribute.NOT_ENUMERABLE)
public static Object getJSON(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.json == LAZY_SENTINEL) {
        global.json = global.getBuiltinJSON();
    }
    return global.json;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java

示例7: getJSAdapter

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for Nashorn extension: global.JSAdapter
 * @param self self reference
 * @return value of the JSAdapter property
 */
@Getter(name = "JSAdapter", attributes = Attribute.NOT_ENUMERABLE)
public static Object getJSAdapter(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.jsadapter == LAZY_SENTINEL) {
        global.jsadapter = global.getBuiltinJSAdapter();
    }
    return global.jsadapter;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java

示例8: getEvalError

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for the EvalError property
 * @param self self reference
 * @return the value of EvalError property
 */
@Getter(name = "EvalError", attributes = Attribute.NOT_ENUMERABLE)
public static Object getEvalError(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.evalError == LAZY_SENTINEL) {
        global.evalError = global.getBuiltinEvalError();
    }
    return global.evalError;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java

示例9: getRangeError

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for the RangeError property.
 * @param self self reference
 * @return the value of RangeError property
 */
@Getter(name = "RangeError", attributes = Attribute.NOT_ENUMERABLE)
public static Object getRangeError(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.rangeError == LAZY_SENTINEL) {
        global.rangeError = global.getBuiltinRangeError();
    }
    return global.rangeError;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java

示例10: getURIError

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for the URIError property.
 * @param self self reference
 * @return the value of URIError property
 */
@Getter(name = "URIError", attributes = Attribute.NOT_ENUMERABLE)
public static Object getURIError(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.uriError == LAZY_SENTINEL) {
        global.uriError = global.getBuiltinURIError();
    }
    return global.uriError;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java

示例11: getArrayBuffer

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for the ArrayBuffer property.
 * @param self self reference
 * @return the value of the ArrayBuffer property
 */
@Getter(name = "ArrayBuffer", attributes = Attribute.NOT_ENUMERABLE)
public static Object getArrayBuffer(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.arrayBuffer == LAZY_SENTINEL) {
        global.arrayBuffer = global.getBuiltinArrayBuffer();
    }
    return global.arrayBuffer;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java

示例12: getDataView

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for the DataView property.
 * @param self self reference
 * @return the value of the DataView property
 */
@Getter(name = "DataView", attributes = Attribute.NOT_ENUMERABLE)
public static Object getDataView(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.dataView == LAZY_SENTINEL) {
        global.dataView = global.getBuiltinDataView();
    }
    return global.dataView;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java

示例13: getInt8Array

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for the Int8Array property.
 * @param self self reference
 * @return the value of the Int8Array property.
 */
@Getter(name = "Int8Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getInt8Array(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.int8Array == LAZY_SENTINEL) {
        global.int8Array = global.getBuiltinInt8Array();
    }
    return global.int8Array;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java

示例14: getUint8Array

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for the Uin8Array property.
 * @param self self reference
 * @return the value of the Uint8Array property
 */
@Getter(name = "Uint8Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getUint8Array(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.uint8Array == LAZY_SENTINEL) {
        global.uint8Array = global.getBuiltinUint8Array();
    }
    return global.uint8Array;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java

示例15: getUint8ClampedArray

import jdk.nashorn.internal.objects.annotations.Getter; //导入依赖的package包/类
/**
 * Getter for the Uint8ClampedArray property.
 * @param self self reference
 * @return the value of the Uint8ClampedArray property
 */
@Getter(name = "Uint8ClampedArray", attributes = Attribute.NOT_ENUMERABLE)
public static Object getUint8ClampedArray(final Object self) {
    final Global global = Global.instanceFrom(self);
    if (global.uint8ClampedArray == LAZY_SENTINEL) {
        global.uint8ClampedArray = global.getBuiltinUint8ClampedArray();
    }
    return global.uint8ClampedArray;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:Global.java


注:本文中的jdk.nashorn.internal.objects.annotations.Getter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。