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


Java TypeDescription.getInternalName方法代码示例

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


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

示例1: wrap

import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
@Override
        public ClassVisitor wrap(TypeDescription typeDescription, ClassVisitor cv, Context context, TypePool typePool,
                                 FieldList<FieldDescription.InDefinedShape> fieldList, MethodList<?> methodList, int i, int i1)
        {
//            public void visit(int version, int modifiers, String name, String signature, String superName, String[] interfaces) {
            cv.visit(ClassFileVersion.JAVA_V9.getMinorMajorVersion(), typeDescription.getModifiers(), typeDescription.getInternalName(), null,
                     typeDescription.getSuperClass().asErasure().getInternalName(), typeDescription.getInterfaces().asErasures().toInternalNames());
            TypeDescription clazz = this.clazz;
            String internalName = clazz.getInternalName();
            String descriptor = clazz.getDescriptor();
            MethodList<InDefinedShape> declaredMethods = clazz.getDeclaredMethods();
            int methodsSize = declaredMethods.size();
            String implName = GENERATED_PREFIX + "." + clazz.getName();
            String internalImplName = GENERATED_PREFIX.replace('.', '/') + "/" + internalName;
            String descriptorImplName = "L" + GENERATED_PREFIX.replace('.', '/') + "/" + internalName + ";";

            FieldVisitor fv;
            MethodVisitor mv;
            AnnotationVisitor av0;

            cv.visitEnd();
            return cv;
        }
 
开发者ID:Diorite,项目名称:Diorite,代码行数:24,代码来源:TransformerInvokerGenerator.java

示例2: toFrame

import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
/**
 * Translates a type into a representation of its form inside a stack map frame.
 *
 * @param typeDescription The type to translate.
 * @return A stack entry representation of the supplied type.
 */
protected static Object toFrame(TypeDescription typeDescription) {
    if (typeDescription.represents(boolean.class)
            || typeDescription.represents(byte.class)
            || typeDescription.represents(short.class)
            || typeDescription.represents(char.class)
            || typeDescription.represents(int.class)) {
        return Opcodes.INTEGER;
    } else if (typeDescription.represents(long.class)) {
        return Opcodes.LONG;
    } else if (typeDescription.represents(float.class)) {
        return Opcodes.FLOAT;
    } else if (typeDescription.represents(double.class)) {
        return Opcodes.DOUBLE;
    } else {
        return typeDescription.getInternalName();
    }
}
 
开发者ID:raphw,项目名称:byte-buddy,代码行数:24,代码来源:Advice.java

示例3: getCommonSuperClass

import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
@Override
protected String getCommonSuperClass(String leftTypeName, String rightTypeName) {
    TypeDescription leftType = typePool.describe(leftTypeName.replace('/', '.')).resolve();
    TypeDescription rightType = typePool.describe(rightTypeName.replace('/', '.')).resolve();
    if (leftType.isAssignableFrom(rightType)) {
        return leftType.getInternalName();
    } else if (leftType.isAssignableTo(rightType)) {
        return rightType.getInternalName();
    } else if (leftType.isInterface() || rightType.isInterface()) {
        return TypeDescription.OBJECT.getInternalName();
    } else {
        do {
            leftType = leftType.getSuperClass().asErasure();
        } while (!leftType.isAssignableFrom(rightType));
        return leftType.getInternalName();
    }
}
 
开发者ID:raphw,项目名称:byte-buddy,代码行数:18,代码来源:TypeWriter.java

示例4: ForReferenceType

import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
/**
 * Creates a new array creator for a reference type.
 *
 * @param referenceType The internal name of this array's non-primitive component type.
 */
protected ForReferenceType(TypeDescription referenceType) {
    this.internalTypeName = referenceType.getInternalName();
}
 
开发者ID:raphw,项目名称:byte-buddy,代码行数:9,代码来源:ArrayFactory.java


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