1 23 package com.sun.ejb.codegen; 24 25 import java.lang.reflect.Method ; 26 import java.io.*; 27 import java.util.*; 28 import java.util.logging.*; 29 import com.sun.logging.*; 30 import com.sun.ejb.EJBUtils; 31 32 import com.sun.enterprise.util.LocalStringManagerImpl; 33 34 import static java.lang.reflect.Modifier .*; 35 import static com.sun.corba.ee.spi.codegen.Wrapper.*; 36 import com.sun.corba.ee.spi.codegen.Type; 37 import com.sun.corba.ee.impl.codegen.ClassGenerator; 38 39 44 45 public class GenericHomeGenerator extends Generator 46 implements ClassGeneratorFactory { 47 48 private static LocalStringManagerImpl localStrings = 49 new LocalStringManagerImpl(GenericHomeGenerator.class); 50 private static Logger _logger=null; 51 static{ 52 _logger=LogDomains.getLogger(LogDomains.DPL_LOGGER); 53 } 54 55 private String genericEJBHomeClassName; 56 private ClassLoader loader; 57 58 62 public String getGeneratedClass() { 63 return genericEJBHomeClassName; 64 } 65 66 public String className() { 68 return getGeneratedClass(); 69 } 70 71 public GenericHomeGenerator(ClassLoader cl) 72 throws GeneratorException 73 { 74 super(); 75 76 genericEJBHomeClassName = EJBUtils.getGenericEJBHomeClassName(); 77 loader = cl; 78 } 79 80 public ClassGenerator evaluate() { 81 82 _clear(); 83 84 String packageName = getPackageName(genericEJBHomeClassName); 85 String simpleName = getBaseName (genericEJBHomeClassName); 86 87 _package(packageName); 88 89 _interface(PUBLIC, simpleName, 90 _t("com.sun.ejb.containers.GenericEJBHome")); 91 92 _method(PUBLIC | ABSTRACT, _t("java.rmi.Remote"), 93 "create", _t("java.rmi.RemoteException")); 94 95 _arg(_String(), "generatedBusinessIntf"); 96 97 _end(); 98 99 _end(); 100 101 return _classGenerator() ; 102 } 103 104 public void generate(OutputStream out) 105 throws GeneratorException, IOException 106 { 107 throw new IllegalStateException ("not supported"); 108 } 109 110 } 111 | Popular Tags |