1 27 28 package org.objectweb.speedo.metadata; 29 30 import org.objectweb.asm.Constants; 31 32 36 public class CodeMethod { 37 38 42 public String name; 43 44 48 public String modifiers; 49 50 54 public String params; 55 56 59 public String [] exceptions; 60 61 64 public boolean isConstructor; 65 66 69 public String superClass; 70 71 74 public String methodDesc; 75 76 77 86 public CodeMethod(String name, 87 String params, 88 String superclass, 89 boolean isConstr, 90 int modifiers, 91 String [] exceptions) { 92 if ((modifiers & Constants.ACC_PUBLIC) != 0) 93 this.modifiers = "public"; 94 else if ((modifiers & Constants.ACC_PRIVATE) != 0) 95 this.modifiers = "protected"; 96 else if ((modifiers & Constants.ACC_PROTECTED) != 0) 97 this.modifiers = "protected"; 98 99 if ((modifiers & Constants.ACC_FINAL) != 0) 100 this.modifiers += " final"; 101 if ((modifiers & Constants.ACC_STATIC) != 0) 102 this.modifiers += " static"; 103 if ((modifiers & Constants.ACC_ABSTRACT) != 0) 104 this.modifiers += " abstract"; 105 106 this.isConstructor = isConstr; 107 this.name = (isConstructor ? null : name); 108 this.params = params; 109 this.superClass = superclass; 110 this.exceptions = exceptions; 111 } 112 } 113 | Popular Tags |