當前位置: 首頁>>代碼示例>>Java>>正文


Java SignatureVisitor類代碼示例

本文整理匯總了Java中org.objectweb.asm.signature.SignatureVisitor的典型用法代碼示例。如果您正苦於以下問題:Java SignatureVisitor類的具體用法?Java SignatureVisitor怎麽用?Java SignatureVisitor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SignatureVisitor類屬於org.objectweb.asm.signature包,在下文中一共展示了SignatureVisitor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: visitTypeArgument

import 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:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:19,代碼來源:TraceSignatureVisitor.java

示例2: visitParameterType

import org.objectweb.asm.signature.SignatureVisitor; //導入依賴的package包/類
@Override
public SignatureVisitor visitParameterType() {
    endFormals();
    if (seenParameter) {
        declaration.append(", ");
    } else {
        seenParameter = true;
        declaration.append('(');
    }
    startType();
    return this;
}
 
開發者ID:acmerli,項目名稱:fastAOP,代碼行數:13,代碼來源:TraceSignatureVisitor.java

示例3: visitClassBound

import 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:acmerli,項目名稱:fastAOP,代碼行數:10,代碼來源:CheckSignatureAdapter.java

示例4: visitInterface

import 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:acmerli,項目名稱:fastAOP,代碼行數:9,代碼來源:CheckSignatureAdapter.java

示例5: mapSignature

import 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:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:24,代碼來源:Remapper.java

示例6: visitSuperclass

import org.objectweb.asm.signature.SignatureVisitor; //導入依賴的package包/類
@Override
public SignatureVisitor visitSuperclass() {
    endFormals();
    separator = " extends ";
    startType();
    return this;
}
 
開發者ID:acmerli,項目名稱:fastAOP,代碼行數:8,代碼來源:TraceSignatureVisitor.java

示例7: visitInterface

import org.objectweb.asm.signature.SignatureVisitor; //導入依賴的package包/類
@Override
public SignatureVisitor visitInterface() {
    separator = seenInterface ? ", " : isInterface ? " extends "
            : " implements ";
    seenInterface = true;
    startType();
    return this;
}
 
開發者ID:acmerli,項目名稱:fastAOP,代碼行數:9,代碼來源:TraceSignatureVisitor.java

示例8: visitTypeArgument

import 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:acmerli,項目名稱:fastAOP,代碼行數:12,代碼來源:CheckSignatureAdapter.java

示例9: visitSuperclass

import 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:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:10,代碼來源:CheckSignatureAdapter.java

示例10: visitParameterType

import 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:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:11,代碼來源:CheckSignatureAdapter.java

示例11: visitReturnType

import 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:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:13,代碼來源:CheckSignatureAdapter.java

示例12: visitExceptionType

import 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:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:9,代碼來源:CheckSignatureAdapter.java

示例13: visitArrayType

import 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:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:10,代碼來源:CheckSignatureAdapter.java

示例14: visitExceptionType

import org.objectweb.asm.signature.SignatureVisitor; //導入依賴的package包/類
@Override
public SignatureVisitor visitExceptionType() {
    if (exceptions == null) {
        exceptions = new StringBuilder();
    } else {
        exceptions.append(", ");
    }
    // startType();
    return new TraceSignatureVisitor(exceptions);
}
 
開發者ID:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:11,代碼來源:TraceSignatureVisitor.java

示例15: visitInterfaceBound

import org.objectweb.asm.signature.SignatureVisitor; //導入依賴的package包/類
@Override
public SignatureVisitor visitInterfaceBound() {
    separator = seenInterfaceBound ? ", " : " extends ";
    seenInterfaceBound = true;
    startType();
    return this;
}
 
開發者ID:acmerli,項目名稱:fastAOP,代碼行數:8,代碼來源:TraceSignatureVisitor.java


注:本文中的org.objectweb.asm.signature.SignatureVisitor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。