Java 类org.objectweb.asm.signature.SignatureVisitor 实例源码

项目:DirectLeaks-AntiReleak-Remover    文件:TraceSignatureVisitor.java   
@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;
}
项目:fastAOP    文件:TraceSignatureVisitor.java   
@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;
}
项目:fastAOP    文件:TraceSignatureVisitor.java   
@Override
public SignatureVisitor visitParameterType() {
    endFormals();
    if (seenParameter) {
        declaration.append(", ");
    } else {
        seenParameter = true;
        declaration.append('(');
    }
    startType();
    return this;
}
项目:fastAOP    文件:CheckSignatureAdapter.java   
@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);
}
项目:fastAOP    文件:CheckSignatureAdapter.java   
@Override
public SignatureVisitor visitInterface() {
    if (state != SUPER) {
        throw new IllegalStateException();
    }
    SignatureVisitor v = sv == null ? null : sv.visitInterface();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
项目:DirectLeaks-AntiReleak-Remover    文件:Remapper.java   
/**
 * @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();
}
项目:fastAOP    文件:TraceSignatureVisitor.java   
@Override
public SignatureVisitor visitSuperclass() {
    endFormals();
    separator = " extends ";
    startType();
    return this;
}
项目:fastAOP    文件:TraceSignatureVisitor.java   
@Override
public SignatureVisitor visitInterface() {
    separator = seenInterface ? ", " : isInterface ? " extends "
            : " implements ";
    seenInterface = true;
    startType();
    return this;
}
项目:fastAOP    文件:CheckSignatureAdapter.java   
@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);
}
项目:DirectLeaks-AntiReleak-Remover    文件:CheckSignatureAdapter.java   
@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);
}
项目:DirectLeaks-AntiReleak-Remover    文件:CheckSignatureAdapter.java   
@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);
}
项目:DirectLeaks-AntiReleak-Remover    文件:CheckSignatureAdapter.java   
@Override
public SignatureVisitor visitInterface() {
    if (state != SUPER) {
        throw new IllegalStateException();
    }
    SignatureVisitor v = sv == null ? null : sv.visitInterface();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
项目:DirectLeaks-AntiReleak-Remover    文件:CheckSignatureAdapter.java   
@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);
}
项目:DirectLeaks-AntiReleak-Remover    文件:CheckSignatureAdapter.java   
@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;
}
项目:DirectLeaks-AntiReleak-Remover    文件:CheckSignatureAdapter.java   
@Override
public SignatureVisitor visitExceptionType() {
    if (state != RETURN) {
        throw new IllegalStateException();
    }
    SignatureVisitor v = sv == null ? null : sv.visitExceptionType();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
项目:DirectLeaks-AntiReleak-Remover    文件:CheckSignatureAdapter.java   
@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);
}
项目:fastAOP    文件:CheckSignatureAdapter.java   
@Override
public SignatureVisitor visitExceptionType() {
    if (state != RETURN) {
        throw new IllegalStateException();
    }
    SignatureVisitor v = sv == null ? null : sv.visitExceptionType();
    return new CheckSignatureAdapter(TYPE_SIGNATURE, v);
}
项目:DirectLeaks-AntiReleak-Remover    文件:TraceSignatureVisitor.java   
@Override
public SignatureVisitor visitSuperclass() {
    endFormals();
    separator = " extends ";
    startType();
    return this;
}
项目:DirectLeaks-AntiReleak-Remover    文件:TraceSignatureVisitor.java   
@Override
public SignatureVisitor visitInterface() {
    separator = seenInterface ? ", " : isInterface ? " extends "
            : " implements ";
    seenInterface = true;
    startType();
    return this;
}
项目:DirectLeaks-AntiReleak-Remover    文件:TraceSignatureVisitor.java   
@Override
public SignatureVisitor visitParameterType() {
    endFormals();
    if (seenParameter) {
        declaration.append(", ");
    } else {
        seenParameter = true;
        declaration.append('(');
    }
    startType();
    return this;
}
项目:DirectLeaks-AntiReleak-Remover    文件:TraceSignatureVisitor.java   
@Override
public SignatureVisitor visitExceptionType() {
    if (exceptions == null) {
        exceptions = new StringBuilder();
    } else {
        exceptions.append(", ");
    }
    // startType();
    return new TraceSignatureVisitor(exceptions);
}
项目:fastAOP    文件:CheckSignatureAdapter.java   
@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);
}
项目:fastAOP    文件:TraceSignatureVisitor.java   
@Override
public SignatureVisitor visitExceptionType() {
    if (exceptions == null) {
        exceptions = new StringBuilder();
    } else {
        exceptions.append(", ");
    }
    // startType();
    return new TraceSignatureVisitor(exceptions);
}
项目:fastAOP    文件:TraceSignatureVisitor.java   
@Override
public SignatureVisitor visitInterfaceBound() {
    separator = seenInterfaceBound ? ", " : " extends ";
    seenInterfaceBound = true;
    startType();
    return this;
}
项目:Spigot-Attribute-Remover    文件:Remapper.java   
/**
 * @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();
}
项目:fastAOP    文件:CheckSignatureAdapter.java   
@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);
}
项目:incubator-netbeans    文件:Asm.java   
@Override
public SignatureVisitor visitTypeArgument(char c) {
    return new NullSignVisitor();
}
项目:incubator-netbeans    文件:Asm.java   
@Override
public SignatureVisitor visitArrayType() {
    load(Opcodes.ALOAD, paramIndex++);
    localSize++;
    return new NullSignVisitor();
}
项目:incubator-netbeans    文件:Asm.java   
@Override
public SignatureVisitor visitExceptionType() {
    return new NullSignVisitor();
}
项目:incubator-netbeans    文件:Asm.java   
@Override
public SignatureVisitor visitReturnType() {
    return new NullSignVisitor();
}
项目:incubator-netbeans    文件:Asm.java   
@Override
public SignatureVisitor visitInterface() {
    return null;
}
项目:incubator-netbeans    文件:Asm.java   
@Override
public SignatureVisitor visitSuperclass() {
    return null;
}
项目:incubator-netbeans    文件:Asm.java   
@Override
public SignatureVisitor visitInterfaceBound() {
    return new NullSignVisitor();
}
项目:incubator-netbeans    文件:Asm.java   
@Override
public SignatureVisitor visitClassBound() {
    return new NullSignVisitor();
}
项目:fastAOP    文件:SignatureRemapper.java   
@Override
public SignatureVisitor visitTypeArgument(char wildcard) {
    v.visitTypeArgument(wildcard);
    return this;
}
项目:DirectLeaks-AntiReleak-Remover    文件:RemappingSignatureAdapter.java   
protected RemappingSignatureAdapter(final int api,
        final SignatureVisitor v, final Remapper remapper) {
    super(api);
    this.v = v;
    this.remapper = remapper;
}
项目:DirectLeaks-AntiReleak-Remover    文件:RemappingSignatureAdapter.java   
@Override
public SignatureVisitor visitArrayType() {
    v.visitArrayType();
    return this;
}
项目:fastAOP    文件:SignatureRemapper.java   
public SignatureRemapper(final SignatureVisitor v, final Remapper remapper) {
    this(Opcodes.ASM5, v, remapper);
}
项目:DirectLeaks-AntiReleak-Remover    文件:RemappingSignatureAdapter.java   
@Override
public SignatureVisitor visitInterfaceBound() {
    v.visitInterfaceBound();
    return this;
}
项目:DirectLeaks-AntiReleak-Remover    文件:RemappingSignatureAdapter.java   
@Override
public SignatureVisitor visitParameterType() {
    v.visitParameterType();
    return this;
}