1 30 31 32 33 package jbet; 34 import java.util.*; 35 36 public class DagMethodInfo extends MethodSignature 37 { 38 private MethodInfo origmi; 39 public DagClassInfo cr; 40 41 public DagMethodInfo() {} 42 43 44 45 public DagMethodInfo (DagClassInfo crin, MethodInfo mi, boolean runGraphify) 46 throws ClassFileException, DataFlowException, ElementNotFoundException 47 { 48 cr = crin; 49 name = mi.name; 50 descriptor = mi.descriptor; 51 accessFlags = mi.accessFlags; 52 exceptions = mi.exceptions; 53 origmi = mi; 54 55 if (runGraphify) { 56 dags = DagSnippit.graphify (mi); 57 ((DagSnippit)dags).method = this; 58 } 59 } 60 61 public DagMethodInfo (DagClassInfo crin, MethodInfo mi) { 62 cr = crin; 63 name = mi.name; 64 descriptor = mi.descriptor; 65 accessFlags = mi.accessFlags; 66 exceptions = mi.exceptions; 67 origmi = mi; 68 } 69 70 public Object classrep() { return cr; } 71 72 public boolean isStatic() { 73 return (accessFlags & MethodInfo.ACC_STATIC) != 0; 74 } 75 76 public boolean isVirtual() { 77 return (accessFlags & MethodInfo.ACC_STATIC) == 0; 78 } 79 80 public boolean isNative() { 81 return (accessFlags & MethodInfo.ACC_NATIVE) != 0; 82 } 83 84 85 public DagSnippit dags() { 86 return (DagSnippit) dags; 87 } 88 89 public MethodInfo resolve() { 90 return origmi; 91 } 92 } 93
| Popular Tags
|