1 19 20 25 26 27 28 29 30 package soot.jimple; 31 32 import soot.*; 33 import soot.util.*; 34 import java.util.*; 35 36 public class ClassConstant extends Constant 37 { 38 public final String value; 39 40 private ClassConstant(String s) 41 { 42 this.value = s; 43 } 44 45 public static ClassConstant v(String value) 46 { 47 return new ClassConstant(value); 48 } 49 50 public boolean equals(Object c) 52 { 53 return (c instanceof ClassConstant && ((ClassConstant) c).value.equals(this.value)); 54 } 55 56 57 public int hashCode() 58 { 59 return value.hashCode(); 60 } 61 62 public String toString() 63 { 64 return "class "+StringTools.getQuotedStringOf(value); 65 } 66 67 public String getValue(){ 68 return value; 69 } 70 71 public Type getType() 72 { 73 return RefType.v("java.lang.Class"); 74 } 75 76 public void apply(Switch sw) 77 { 78 ((ConstantSwitch) sw).caseClassConstant(this); 79 } 80 } 81 | Popular Tags |