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


Java TypeDescription.UNDEFINED属性代码示例

本文整理汇总了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);
}
 
开发者ID:raphw,项目名称:byte-buddy,代码行数:20,代码来源:InstrumentedType.java

示例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));
}
 
开发者ID:raphw,项目名称:byte-buddy,代码行数:31,代码来源:MethodGraphCompilerDefaultTest.java

示例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));
}
 
开发者ID:raphw,项目名称:byte-buddy,代码行数:34,代码来源:MethodGraphCompilerDefaultTest.java

示例4: getDeclaringType

@Override
public TypeDescription getDeclaringType() {
    return declaringTypeName == null
            ? TypeDescription.UNDEFINED
            : typePool.describe(declaringTypeName).resolve();
}
 
开发者ID:raphw,项目名称:byte-buddy,代码行数:6,代码来源:TypePool.java

示例5: getEnclosingType

@Override
public TypeDescription getEnclosingType(TypePool typePool) {
    return TypeDescription.UNDEFINED;
}
 
开发者ID:raphw,项目名称:byte-buddy,代码行数:4,代码来源:TypePool.java


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