本文整理汇总了Java中net.bytebuddy.description.type.TypeDescription.UNDEFINED属性的典型用法代码示例。如果您正苦于以下问题:Java TypeDescription.UNDEFINED属性的具体用法?Java TypeDescription.UNDEFINED怎么用?Java TypeDescription.UNDEFINED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.bytebuddy.description.type.TypeDescription
的用法示例。
在下文中一共展示了TypeDescription.UNDEFINED属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: subclass
@Override
public InstrumentedType.WithFlexibleName subclass(String name, int modifiers, TypeDescription.Generic superClass) {
return new InstrumentedType.Default(name,
modifiers,
superClass,
Collections.<TypeVariableToken>emptyList(),
Collections.<Generic>emptyList(),
Collections.<FieldDescription.Token>emptyList(),
Collections.<MethodDescription.Token>emptyList(),
Collections.<AnnotationDescription>emptyList(),
TypeInitializer.None.INSTANCE,
LoadedTypeInitializer.NoOp.INSTANCE,
TypeDescription.UNDEFINED,
MethodDescription.UNDEFINED,
TypeDescription.UNDEFINED,
Collections.<TypeDescription>emptyList(),
false,
false,
false);
}
示例2: testVisibilityExtension
@Test
public void testVisibilityExtension() throws Exception {
TypeDescription typeDescription = new InstrumentedType.Default("foo",
Opcodes.ACC_PUBLIC,
new TypeDescription.Generic.OfNonGenericType.ForLoadedType(VisibilityExtension.Base.class),
Collections.<TypeVariableToken>emptyList(),
Collections.<TypeDescription.Generic>singletonList(new TypeDescription.Generic.OfNonGenericType.ForLoadedType(VisibilityExtension.class)),
Collections.<FieldDescription.Token>emptyList(),
Collections.<MethodDescription.Token>emptyList(),
Collections.<AnnotationDescription>emptyList(),
TypeInitializer.None.INSTANCE,
LoadedTypeInitializer.NoOp.INSTANCE,
TypeDescription.UNDEFINED,
MethodDescription.UNDEFINED,
TypeDescription.UNDEFINED,
Collections.<TypeDescription>emptyList(),
false,
false,
false);
MethodDescription.SignatureToken signatureToken = new MethodDescription.SignatureToken("foo",
new TypeDescription.ForLoadedType(void.class),
Collections.<TypeDescription>emptyList());
MethodGraph.Linked methodGraph = MethodGraph.Compiler.Default.forJavaHierarchy().compile(typeDescription);
assertThat(methodGraph.listNodes().size(), is(1 + TypeDescription.OBJECT.getDeclaredMethods().filter(ElementMatchers.isVirtual()).size()));
MethodGraph.Node node = methodGraph.locate(signatureToken);
assertThat(node.getSort(), is(MethodGraph.Node.Sort.RESOLVED));
assertThat(node.getRepresentative().asSignatureToken(), is(signatureToken));
assertThat(node.getMethodTypes().size(), is(1));
assertThat(node.getMethodTypes(), hasItem(signatureToken.asTypeToken()));
assertThat(node.getVisibility(), is(Visibility.PUBLIC));
}
示例3: testOrphanedBridge
@Test
public void testOrphanedBridge() throws Exception {
MethodDescription.SignatureToken bridgeMethod = new MethodDescription.SignatureToken("foo",
TypeDescription.VOID,
Collections.<TypeDescription>emptyList());
TypeDescription typeDescription = new InstrumentedType.Default("foo",
Opcodes.ACC_PUBLIC,
TypeDescription.Generic.OBJECT,
Collections.<TypeVariableToken>emptyList(),
Collections.<TypeDescription.Generic>emptyList(),
Collections.<FieldDescription.Token>emptyList(),
Collections.singletonList(new MethodDescription.Token("foo",
Opcodes.ACC_BRIDGE,
TypeDescription.Generic.VOID,
Collections.<TypeDescription.Generic>emptyList())),
Collections.<AnnotationDescription>emptyList(),
TypeInitializer.None.INSTANCE,
LoadedTypeInitializer.NoOp.INSTANCE,
TypeDescription.UNDEFINED,
MethodDescription.UNDEFINED,
TypeDescription.UNDEFINED,
Collections.<TypeDescription>emptyList(),
false,
false,
false);
MethodGraph.Linked methodGraph = MethodGraph.Compiler.Default.forJavaHierarchy().compile(typeDescription);
assertThat(methodGraph.listNodes().size(), is(1 + TypeDescription.OBJECT.getDeclaredMethods().filter(ElementMatchers.isVirtual()).size()));
MethodGraph.Node node = methodGraph.locate(bridgeMethod);
assertThat(node.getSort(), is(MethodGraph.Node.Sort.RESOLVED));
assertThat(node.getRepresentative().asSignatureToken(), is(bridgeMethod));
assertThat(node.getMethodTypes().size(), is(1));
assertThat(node.getMethodTypes(), hasItem(bridgeMethod.asTypeToken()));
assertThat(node.getVisibility(), is(Visibility.PACKAGE_PRIVATE));
}
示例4: getDeclaringType
@Override
public TypeDescription getDeclaringType() {
return declaringTypeName == null
? TypeDescription.UNDEFINED
: typePool.describe(declaringTypeName).resolve();
}
示例5: getEnclosingType
@Override
public TypeDescription getEnclosingType(TypePool typePool) {
return TypeDescription.UNDEFINED;
}