本文整理汇总了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}};
}
示例2: asConstant
@Override
public Constant asConstant() {
if (alwaysNull) {
return JavaConstant.NULL_POINTER;
} else {
return null;
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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;
}
示例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}};
}
示例9: DeoptimizeNode
public DeoptimizeNode(DeoptimizationAction action, DeoptimizationReason reason) {
this(action, reason, DEFAULT_DEBUG_ID, JavaConstant.NULL_POINTER, null);
}
示例10: FixedGuardNode
public FixedGuardNode(LogicNode condition, DeoptimizationReason deoptReason, DeoptimizationAction action) {
this(condition, deoptReason, action, JavaConstant.NULL_POINTER, false);
}
示例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}};
}