本文整理汇总了Java中net.bytebuddy.description.type.TypeDescription.getName方法的典型用法代码示例。如果您正苦于以下问题:Java TypeDescription.getName方法的具体用法?Java TypeDescription.getName怎么用?Java TypeDescription.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.bytebuddy.description.type.TypeDescription
的用法示例。
在下文中一共展示了TypeDescription.getName方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: represent
import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
@Override
public InstrumentedType.WithFlexibleName represent(TypeDescription typeDescription) {
return new InstrumentedType.Default(typeDescription.getName(),
typeDescription.getModifiers(),
typeDescription.getSuperClass(),
typeDescription.getTypeVariables().asTokenList(is(typeDescription)),
typeDescription.getInterfaces().accept(Generic.Visitor.Substitutor.ForDetachment.of(typeDescription)),
typeDescription.getDeclaredFields().asTokenList(is(typeDescription)),
typeDescription.getDeclaredMethods().asTokenList(is(typeDescription)),
typeDescription.getDeclaredAnnotations(),
TypeInitializer.None.INSTANCE,
LoadedTypeInitializer.NoOp.INSTANCE,
typeDescription.getDeclaringType(),
typeDescription.getEnclosingMethod(),
typeDescription.getEnclosingType(),
typeDescription.getDeclaredTypes(),
typeDescription.isMemberClass(),
typeDescription.isAnonymousClass(),
typeDescription.isLocalClass());
}
示例3: apply
import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
@Override
public String apply(TypeDescription instrumentedType, MethodDescription instrumentedMethod) {
return instrumentedType.getName();
}
示例4: redefine
import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
@Override
public String redefine(TypeDescription typeDescription) {
return typeDescription.getName();
}
示例5: rebase
import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
@Override
public String rebase(TypeDescription typeDescription) {
return typeDescription.getName();
}
示例6: name
import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
@Override
protected String name(TypeDescription superClass) {
return prefix + "." + superClass.getName() + "$" + randomString.nextString();
}
示例7: name
import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
@Override
public String name(TypeDescription instrumentedType) {
return instrumentedType.getName() + "$" + suffix + "$" + randomString.nextString();
}
示例8: getClassAlreadyTransformedKey
import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
private String getClassAlreadyTransformedKey(TypeDescription typeDescription, ClassLoader classLoader) {
return getAdviceClass() + typeDescription.getName() + ClassUtils.getIdentityString(classLoader) + ".transformed";
}
示例9: resolve
import net.bytebuddy.description.type.TypeDescription; //导入方法依赖的package包/类
@Override
public String resolve(TypeDescription typeDescription) {
return typeDescription.getName();
}