本文整理汇总了Java中sun.invoke.util.Wrapper.basicTypeChar方法的典型用法代码示例。如果您正苦于以下问题:Java Wrapper.basicTypeChar方法的具体用法?Java Wrapper.basicTypeChar怎么用?Java Wrapper.basicTypeChar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.invoke.util.Wrapper
的用法示例。
在下文中一共展示了Wrapper.basicTypeChar方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: emitBoxing
import sun.invoke.util.Wrapper; //导入方法依赖的package包/类
/**
* Emit a boxing call.
*
* @param wrapper primitive type class to box.
*/
private void emitBoxing(Wrapper wrapper) {
String owner = "java/lang/" + wrapper.wrapperType().getSimpleName();
String name = "valueOf";
String desc = "(" + wrapper.basicTypeChar() + ")L" + owner + ";";
mv.visitMethodInsn(Opcodes.INVOKESTATIC, owner, name, desc, false);
}
示例2: emitUnboxing
import sun.invoke.util.Wrapper; //导入方法依赖的package包/类
/**
* Emit an unboxing call (plus preceding checkcast).
*
* @param wrapper wrapper type class to unbox.
*/
private void emitUnboxing(Wrapper wrapper) {
String owner = "java/lang/" + wrapper.wrapperType().getSimpleName();
String name = wrapper.primitiveSimpleName() + "Value";
String desc = "()" + wrapper.basicTypeChar();
emitReferenceCast(wrapper.wrapperType(), null);
mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, owner, name, desc, false);
}
示例3: unboxingDescriptor
import sun.invoke.util.Wrapper; //导入方法依赖的package包/类
private static String unboxingDescriptor(Wrapper w) {
return "()" + w.basicTypeChar();
}
示例4: name
import sun.invoke.util.Wrapper; //导入方法依赖的package包/类
static String name(Class<?> arrayClass, boolean isSetter) {
Class<?> elemClass = arrayClass.getComponentType();
if (elemClass == null) throw newIllegalArgumentException("not an array", arrayClass);
return (!isSetter ? "getElement" : "setElement") + Wrapper.basicTypeChar(elemClass);
}
示例5: basicType
import sun.invoke.util.Wrapper; //导入方法依赖的package包/类
static BasicType basicType(Wrapper type) {
char c = type.basicTypeChar();
return basicType(c);
}
示例6: boxingDescriptor
import sun.invoke.util.Wrapper; //导入方法依赖的package包/类
private static String boxingDescriptor(Wrapper w) {
return "(" + w.basicTypeChar() + ")L" + wrapperName(w) + ";";
}
示例7: name
import sun.invoke.util.Wrapper; //导入方法依赖的package包/类
static String name(Class<?> arrayClass, ArrayAccess access) {
Class<?> elemClass = arrayClass.getComponentType();
if (elemClass == null) throw newIllegalArgumentException("not an array", arrayClass);
return ArrayAccess.opName(access) + Wrapper.basicTypeChar(elemClass);
}