001: package tide.bytecode.asm;
002:
003: import tide.utils.SyntaxUtils;
004: import org.objectweb.asm.signature.*;
005:
006: public class SignatureVisitorAd implements SignatureVisitor {
007: // private int arrayDepth = 0;
008: //public List<String> javaNames = new ArrayList<String>();
009:
010: boolean debug = false;
011:
012: public SignatureVisitorAd() {
013: }
014:
015: final public static SignatureVisitorAd emptyVisitor = new SignatureVisitorAd();
016:
017: public void visitFormalTypeParameter(String name) {
018: if (debug)
019: System.out.println("SVAD:formal type param: " + name);
020: }
021:
022: public void visitEnd() {
023: if (debug)
024: System.out.println("SVAD:end\n");
025: }
026:
027: public SignatureVisitor visitClassBound() {
028: if (debug)
029: System.out.println("SVAD:class bound");
030: return emptyVisitor;
031: }
032:
033: public SignatureVisitor visitInterfaceBound() {
034: if (debug)
035: System.out.println("SVAD:int bound");
036: return emptyVisitor;
037: }
038:
039: public SignatureVisitor visitSuperclass() {
040: if (debug)
041: System.out.println("SVAD:supercl");
042: return emptyVisitor;
043: }
044:
045: public SignatureVisitor visitInterface() {
046: if (debug)
047: System.out.println("SVAD:interf");
048: return emptyVisitor;
049:
050: }
051:
052: /** called at type start */
053: public SignatureVisitor visitParameterType() {
054: if (debug)
055: System.out.println("SVAD:visit param type");
056: //arrayDepth = 0;
057: return emptyVisitor;
058:
059: }
060:
061: public SignatureVisitor visitReturnType() {
062: return emptyVisitor;
063: }
064:
065: public SignatureVisitor visitExceptionType() {
066: return emptyVisitor;
067:
068: }
069:
070: public void visitBaseType(char descriptor) {
071: String tn = SyntaxUtils.getNameForVMNativeType(descriptor);
072:
073: if (debug)
074: System.out.println("base type " + descriptor + " " + tn);
075:
076: }
077:
078: public void visitTypeVariable(String name) {
079: if (debug)
080: System.out.println("type variable " + name);
081: }
082:
083: public SignatureVisitor visitArrayType() {
084: if (debug)
085: System.out.println("Array type");
086: // arrayDepth++;
087: return emptyVisitor;
088: }
089:
090: public void visitClassType(String name) {
091: if (debug)
092: System.out.println("visitClassType " + name);
093: }
094:
095: public void visitInnerClassType(String name) {
096: if (debug)
097: System.out.println("inner class type " + name);
098: }
099:
100: public SignatureVisitor visitTypeArgument(char wildcard) {
101: if (debug)
102: System.out.println("type argument");
103: return emptyVisitor;
104:
105: }
106:
107: public void visitTypeArgument() {
108: if (debug)
109: System.out.println("visit type arg");
110: }
111:
112: }
|