1 23 24 25 package com.sun.jdo.api.persistence.enhancer.classfile; 26 27 import java.util.Hashtable ; 28 29 32 33 class CodeEnv { 34 35 private ConstantPool constantPool; 36 37 38 private Hashtable targets = new Hashtable (7); 39 40 CodeEnv(ConstantPool constantPool) { 41 this.constantPool = constantPool; 42 } 43 44 final InsnTarget getTarget(int offset) { 45 Integer off = new Integer (offset); 46 InsnTarget targ = (InsnTarget)targets.get(off); 47 if (targ == null) { 48 targ = new InsnTarget(offset); 49 targets.put(off, targ); 50 } 51 return targ; 52 } 53 54 final InsnTarget findTarget(int offset) { 55 Integer off = new Integer (offset); 56 return (InsnTarget)targets.get(off); 57 } 58 59 final ConstantPool pool() { 60 return constantPool; 61 } 62 63 } 64 65 | Popular Tags |