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


Java JavaConstant.NULL_POINTER属性代码示例

本文整理汇总了Java中jdk.vm.ci.meta.JavaConstant.NULL_POINTER属性的典型用法代码示例。如果您正苦于以下问题:Java JavaConstant.NULL_POINTER属性的具体用法?Java JavaConstant.NULL_POINTER怎么用?Java JavaConstant.NULL_POINTER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在jdk.vm.ci.meta.JavaConstant的用法示例。


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

示例1: asJavaTypeDataProvider

@DataProvider(name = "asJavaTypeDataProvider")
public static Object[][] asJavaTypeDataProvider() {
    return new Object[][]{
                    {CONSTANT_REFLECTION_PROVIDER.forObject(DummyClass.class),
                                    "jdk.vm.ci.hotspot.test.DummyClass"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(boolean.class), "boolean"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(byte.class), "byte"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(short.class), "short"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(char.class), "char"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(int.class), "int"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(long.class), "long"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(float.class), "float"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(double.class), "double"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(Object.class), "java.lang.Object"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(boolean[].class), "boolean[]"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(boolean[][].class), "boolean[][]"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(Object[].class), "java.lang.Object[]"},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(Object[][].class), "java.lang.Object[][]"},
                    {JavaConstant.forBoolean(DUMMY_CLASS_INSTANCE.booleanField), null},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(DUMMY_CLASS_INSTANCE.objectField), null},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(DUMMY_CLASS_INSTANCE), null},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(DUMMY_CLASS_INSTANCE.booleanArrayWithValues), null},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(DUMMY_CLASS_INSTANCE.booleanArrayArrayWithValues), null},
                    {JavaConstant.NULL_POINTER, null}, {null, null}};
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:25,代码来源:AsJavaTypeDataProvider.java

示例2: asConstant

@Override
public Constant asConstant() {
    if (alwaysNull) {
        return JavaConstant.NULL_POINTER;
    } else {
        return null;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:AbstractPointerStamp.java

示例3: reverse

@Override
public Constant reverse(Constant c, ConstantReflectionProvider constantReflection) {
    if (JavaConstant.NULL_POINTER.equals(c)) {
        return c;
    }
    ResolvedJavaType type = constantReflection.asJavaType(c);
    if (type.isPrimitive()) {
        return JavaConstant.NULL_POINTER;
    } else {
        return constantReflection.asObjectHub(type);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:HubGetClassNode.java

示例4: convert

@Override
public Constant convert(Constant c, ConstantReflectionProvider constantReflection) {
    ResolvedJavaType exactType = constantReflection.asJavaType(c);
    if (exactType.isPrimitive()) {
        return JavaConstant.NULL_POINTER;
    } else {
        return constantReflection.asObjectHub(exactType);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ClassGetHubNode.java

示例5: forObject

static JavaConstant forObject(Object object, boolean compressed) {
    if (object == null) {
        return compressed ? HotSpotCompressedNullConstant.COMPRESSED_NULL : JavaConstant.NULL_POINTER;
    } else {
        return new HotSpotObjectConstantImpl(object, compressed);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:7,代码来源:HotSpotObjectConstantImpl.java

示例6: readKlassPointerConstant

@Override
public Constant readKlassPointerConstant(Constant base, long displacement) {
    HotSpotResolvedObjectTypeImpl klass = readKlass(base, displacement, false);
    if (klass == null) {
        return JavaConstant.NULL_POINTER;
    }
    return HotSpotMetaspaceConstantImpl.forMetaspaceObject(klass, false);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:HotSpotMemoryAccessProviderImpl.java

示例7: getInvokeBasicDataNegative1

@DataProvider(name = "invokeBasicNegative1")
public static Object[][] getInvokeBasicDataNegative1() {
    Object[][] result;
    JavaConstant wrongObject = CONSTANT_REFLECTION.forObject("42");
    // 2nd parameter is force bytecode generation = true/false
    result = new Object[][]{
                    new Object[]{wrongObject, true},
                    new Object[]{wrongObject, false},
                    new Object[]{JavaConstant.NULL_POINTER, true},
                    new Object[]{JavaConstant.NULL_POINTER, false}};
    return result;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:MethodHandleAccessProviderData.java

示例8: isEmbeddableDataProvider

@DataProvider(name = "isEmbeddableDataProvider")
public static Object[][] isEmbeddableDataProvider() {
    return new Object[][]{{JavaConstant.forBoolean(DUMMY_CLASS_INSTANCE.booleanField), true},
                    {JavaConstant.forByte(DUMMY_CLASS_INSTANCE.byteField), true},
                    {JavaConstant.forShort(DUMMY_CLASS_INSTANCE.shortField), true},
                    {JavaConstant.forInt(DUMMY_CLASS_INSTANCE.intField), true},
                    {JavaConstant.forLong(DUMMY_CLASS_INSTANCE.longField), true},
                    {JavaConstant.forChar(DUMMY_CLASS_INSTANCE.charField), true},
                    {JavaConstant.forFloat(DUMMY_CLASS_INSTANCE.floatField), true},
                    {JavaConstant.forDouble(DUMMY_CLASS_INSTANCE.doubleField), true},
                    {CONSTANT_REFLECTION_PROVIDER.forObject(DUMMY_CLASS_INSTANCE.objectField), true},
                    {JavaConstant.NULL_POINTER, true}, {null, true}};
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:IsEmbeddableDataProvider.java

示例9: DeoptimizeNode

public DeoptimizeNode(DeoptimizationAction action, DeoptimizationReason reason) {
    this(action, reason, DEFAULT_DEBUG_ID, JavaConstant.NULL_POINTER, null);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:3,代码来源:DeoptimizeNode.java

示例10: FixedGuardNode

public FixedGuardNode(LogicNode condition, DeoptimizationReason deoptReason, DeoptimizationAction action) {
    this(condition, deoptReason, action, JavaConstant.NULL_POINTER, false);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:3,代码来源:FixedGuardNode.java

示例11: getNegativeJavaKinds

@DataProvider(name = "negative")
public static Object[][] getNegativeJavaKinds() {
    return new Object[][]{
                    new Object[]{JavaKind.Void, JavaConstant.NULL_POINTER},
                    new Object[]{JavaKind.Illegal, JavaConstant.INT_1}};
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:MemoryAccessProviderData.java


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