• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SignatureVisitor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中jdk.internal.org.objectweb.asm.signature.SignatureVisitor的典型用法代码示例。如果您正苦于以下问题:Java SignatureVisitor类的具体用法?Java SignatureVisitor怎么用?Java SignatureVisitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SignatureVisitor类属于jdk.internal.org.objectweb.asm.signature包,在下文中一共展示了SignatureVisitor类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: visitTypeArgument

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitTypeArgument(final char tag) {
    if (argumentStack % 2 == 0) {
        ++argumentStack;
        declaration.append('<');
    } else {
        declaration.append(", ");
    }

    if (tag == EXTENDS) {
        declaration.append("? extends ");
    } else if (tag == SUPER) {
        declaration.append("? super ");
    }

    startType();
    return this;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:TraceSignatureVisitor.java


示例2: mapSignature

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
/**
 *
 * @param typeSignature
 *            true if signature is a FieldTypeSignature, such as the
 *            signature parameter of the ClassVisitor.visitField or
 *            MethodVisitor.visitLocalVariable methods
 */
public String mapSignature(String signature, boolean typeSignature) {
    if (signature == null) {
        return null;
    }
    SignatureReader r = new SignatureReader(signature);
    SignatureWriter w = new SignatureWriter();
    SignatureVisitor a = createRemappingSignatureAdapter(w);
    if (typeSignature) {
        r.acceptType(a);
    } else {
        r.accept(a);
    }
    return w.toString();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:Remapper.java


示例3: visitClassBound

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitClassBound() {
    if (state != FORMAL) {
        throw new IllegalStateException();
    }
    state = BOUND;
    SignatureVisitor v = sv == null ? null : sv.visitClassBound();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:CheckSignatureAdapter.java


示例4: visitInterfaceBound

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitInterfaceBound() {
    if (state != FORMAL && state != BOUND) {
        throw new IllegalArgumentException();
    }
    SignatureVisitor v = sv == null ? null : sv.visitInterfaceBound();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:CheckSignatureAdapter.java


示例5: visitSuperclass

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitSuperclass() {
    if (type != CLASS_SIGNATURE || (state & (EMPTY | FORMAL | BOUND)) == 0) {
        throw new IllegalArgumentException();
    }
    state = SUPER;
    SignatureVisitor v = sv == null ? null : sv.visitSuperclass();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:CheckSignatureAdapter.java


示例6: visitInterface

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitInterface() {
    if (state != SUPER) {
        throw new IllegalStateException();
    }
    SignatureVisitor v = sv == null ? null : sv.visitInterface();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:CheckSignatureAdapter.java


示例7: visitParameterType

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitParameterType() {
    if (type != METHOD_SIGNATURE
            || (state & (EMPTY | FORMAL | BOUND | PARAM)) == 0) {
        throw new IllegalArgumentException();
    }
    state = PARAM;
    SignatureVisitor v = sv == null ? null : sv.visitParameterType();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:CheckSignatureAdapter.java


示例8: visitReturnType

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitReturnType() {
    if (type != METHOD_SIGNATURE
            || (state & (EMPTY | FORMAL | BOUND | PARAM)) == 0) {
        throw new IllegalArgumentException();
    }
    state = RETURN;
    SignatureVisitor v = sv == null ? null : sv.visitReturnType();
    CheckSignatureAdapter cv = new CheckSignatureAdapter(TYPE_SIGNATURE, v);
    cv.canBeVoid = true;
    return cv;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:CheckSignatureAdapter.java


示例9: visitExceptionType

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitExceptionType() {
    if (state != RETURN) {
        throw new IllegalStateException();
    }
    SignatureVisitor v = sv == null ? null : sv.visitExceptionType();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:CheckSignatureAdapter.java


示例10: visitTypeArgument

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitTypeArgument(final char wildcard) {
    if (state != CLASS_TYPE) {
        throw new IllegalStateException();
    }
    if ("+-=".indexOf(wildcard) == -1) {
        throw new IllegalArgumentException();
    }
    SignatureVisitor v = sv == null ? null : sv.visitTypeArgument(wildcard);
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:CheckSignatureAdapter.java


示例11: visitInterfaceBound

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitInterfaceBound() {
    separator = seenInterfaceBound ? ", " : " extends ";
    seenInterfaceBound = true;
    startType();
    return this;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:TraceSignatureVisitor.java


示例12: visitSuperclass

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitSuperclass() {
    endFormals();
    separator = " extends ";
    startType();
    return this;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:TraceSignatureVisitor.java


示例13: visitInterface

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitInterface() {
    separator = seenInterface ? ", " : isInterface ? " extends "
            : " implements ";
    seenInterface = true;
    startType();
    return this;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:TraceSignatureVisitor.java


示例14: visitParameterType

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitParameterType() {
    endFormals();
    if (seenParameter) {
        declaration.append(", ");
    } else {
        seenParameter = true;
        declaration.append('(');
    }
    startType();
    return this;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:TraceSignatureVisitor.java


示例15: visitExceptionType

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitExceptionType() {
    if (exceptions == null) {
        exceptions = new StringBuffer();
    } else {
        exceptions.append(", ");
    }
    // startType();
    return new TraceSignatureVisitor(exceptions);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:TraceSignatureVisitor.java


示例16: visitArrayType

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitArrayType() {
    if (type != TYPE_SIGNATURE || state != EMPTY) {
        throw new IllegalStateException();
    }
    state = SIMPLE_TYPE;
    SignatureVisitor v = sv == null ? null : sv.visitArrayType();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:10,代码来源:CheckSignatureAdapter.java


示例17: visitReturnType

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitReturnType() {
    endFormals();
    if (seenParameter) {
        seenParameter = false;
    } else {
        declaration.append('(');
    }
    declaration.append(')');
    returnType = new StringBuffer();
    return new TraceSignatureVisitor(returnType);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:13,代码来源:TraceSignatureVisitor.java


示例18: mapSignature

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
/**
 * @param signature
 *            signature for mapper
 * @param typeSignature
 *            true if signature is a FieldTypeSignature, such as the
 *            signature parameter of the ClassVisitor.visitField or
 *            MethodVisitor.visitLocalVariable methods
 * @return signature rewritten as a string
 */
public String mapSignature(String signature, boolean typeSignature) {
    if (signature == null) {
        return null;
    }
    SignatureReader r = new SignatureReader(signature);
    SignatureWriter w = new SignatureWriter();
    SignatureVisitor a = createSignatureRemapper(w);
    if (typeSignature) {
        r.acceptType(a);
    } else {
        r.accept(a);
    }
    return w.toString();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:24,代码来源:Remapper.java


示例19: visitReturnType

import jdk.internal.org.objectweb.asm.signature.SignatureVisitor; //导入依赖的package包/类
@Override
public SignatureVisitor visitReturnType() {
    endFormals();
    if (seenParameter) {
        seenParameter = false;
    } else {
        declaration.append('(');
    }
    declaration.append(')');
    returnType = new StringBuilder();
    return new TraceSignatureVisitor(returnType);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:TraceSignatureVisitor.java



注:本文中的jdk.internal.org.objectweb.asm.signature.SignatureVisitor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WireBox类代码示例发布时间:2022-05-22
下一篇:
Java TestName类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap