/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>type</code> from <code>conf</code>'s * repository. */ public PCEnhancer(OpenJPAConfiguration conf, Class type) { this(conf, AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), type)), (MetaDataRepository) null); }
/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>type</code> from <code>conf</code>'s * repository. */ public PCEnhancer(OpenJPAConfiguration conf, Class type) { this(conf, (BCClass) AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), type)), (MetaDataRepository) null); }
/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>type</code> from <code>conf</code>'s * repository. */ public PCEnhancer(OpenJPAConfiguration conf, Class type) { this(conf, AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), type)), (MetaDataRepository) null); }
/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>type</code> from <code>conf</code>'s * repository. */ public PCEnhancer(OpenJPAConfiguration conf, Class type) { this(conf, AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), type)), (MetaDataRepository) null); }
/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>type</code> from <code>conf</code>'s * repository. */ public PCEnhancer(OpenJPAConfiguration conf, Class type) { this(conf, AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), type)), (MetaDataRepository) null); }
/** * The public constructor is for creating template code modules * that produce {@link Instruction}s used in matching through * the various <code>search</code> and <code>replace</code> methods. */ public Code() { this(0, new Project().loadClass("", null).declareMethod("", void.class, null)); }
/** * The public constructor is for creating template code modules * that produce {@link Instruction}s used in matching through * the various <code>search</code> and <code>replace</code> methods. */ public Code() { this(0, new Project().loadClass("", null).declareMethod("", void.class, null)); }
/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>meta</code> by converting back to a class * and then loading from <code>conf</code>'s repository. */ public PCEnhancer(OpenJPAConfiguration conf, ClassMetaData meta) { this(conf, AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), meta.getDescribedType())), meta.getRepository()); }
/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>meta</code> by converting back to a class * and then loading from <code>conf</code>'s repository. */ public PCEnhancer(OpenJPAConfiguration conf, ClassMetaData meta) { this(conf, (BCClass) AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), meta.getDescribedType())), meta.getRepository()); }
/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>meta</code> by converting back to a class * and then loading from <code>conf</code>'s repository. */ public PCEnhancer(OpenJPAConfiguration conf, ClassMetaData meta) { this(conf, AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), meta.getDescribedType())), meta.getRepository()); }
/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>meta</code> by converting back to a class * and then loading from <code>conf</code>'s repository. */ public PCEnhancer(OpenJPAConfiguration conf, ClassMetaData meta) { this(conf, AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), meta.getDescribedType())), meta.getRepository()); }
/** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for <code>meta</code> by converting back to a class * and then loading from <code>conf</code>'s repository. */ public PCEnhancer(OpenJPAConfiguration conf, ClassMetaData meta) { this(conf, AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(new Project(), meta.getDescribedType())), meta.getRepository()); }
public static void main(String[] args) throws IOException { Project project = new Project(); InputStream in = WASManagedRuntime.class.getClassLoader() .getResourceAsStream(CLASS.replace('.', '/') + ".class"); BCClass bcClass = project.loadClass(in); String [] interfaces = bcClass.getInterfaceNames(); if(interfaces != null) { for(int i = 0; i < interfaces.length; i++) { if(interfaces[i].equals(INTERFACE)) { return; } } } bcClass.declareInterface(INTERFACE); AsmAdaptor.write(bcClass); }
public static void main(String[] args) throws IOException { Project project = new Project(); InputStream in = WASManagedRuntime.class.getClassLoader() .getResourceAsStream(CLASS.replace('.', '/') + ".class"); BCClass bcClass = project.loadClass(in); String [] interfaces = bcClass.getInterfaceNames(); if(interfaces != null) { for(int i = 0; i < interfaces.length; i++) { if(interfaces[i].equals(INTERFACE)) { return; } } } bcClass.declareInterface(INTERFACE); bcClass.write(); }
/** * Generate the bytecode for a date proxy for the given type. */ protected BCClass generateProxyDateBytecode(Class type, boolean runtime) { assertNotFinal(type); Project project = new Project(); BCClass bc = AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(project, getProxyClassName(type, runtime))); bc.setSuperclass(type); bc.declareInterface(ProxyDate.class); delegateConstructors(bc, type); addProxyMethods(bc, true); addProxyDateMethods(bc, type); proxySetters(bc, type); addWriteReplaceMethod(bc, runtime); return bc; }
/** * Generate the bytecode for a date proxy for the given type. */ protected BCClass generateProxyDateBytecode(Class type, boolean runtime) { assertNotFinal(type); Project project = new Project(); BCClass bc = AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(project, getProxyClassName(type, runtime))); bc.setSuperclass(type); bc.declareInterface(ProxyDate.class); delegateConstructors(bc, type); addProxyMethods(bc, true); addProxyDateMethods(bc, type); proxySetters(bc, type); addWriteReplaceMethod(bc, runtime); return bc; }
/** * Generate the bytecode for a date proxy for the given type. */ protected BCClass generateProxyDateBytecode(Class type, boolean runtime) { assertNotFinal(type); Project project = new Project(); BCClass bc = AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(project, getProxyClassName(type, runtime))); bc.setSuperclass(type); bc.declareInterface(ProxyDate.class); delegateConstructors(bc, type); addProxyMethods(bc, true); addProxyDateMethods(bc, type); proxySetters(bc, type); addWriteReplaceMethod(bc, runtime); return bc; }
/** * Generate the bytecode for a date proxy for the given type. */ protected BCClass generateProxyDateBytecode(Class type, boolean runtime) { assertNotFinal(type); Project project = new Project(); BCClass bc = (BCClass) AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(project, getProxyClassName(type, runtime))); bc.setSuperclass(type); bc.declareInterface(ProxyDate.class); delegateConstructors(bc, type); addProxyMethods(bc, true); addProxyDateMethods(bc, type); proxySetters(bc, type); addWriteReplaceMethod(bc, runtime); return bc; }
/** * Generate the bytecode for a date proxy for the given type. */ protected BCClass generateProxyDateBytecode(Class type, boolean runtime) { assertNotFinal(type); Project project = new Project(); BCClass bc = AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(project, getProxyClassName(type, runtime))); bc.setSuperclass(type); bc.declareInterface(ProxyDate.class); delegateConstructors(bc, type); addProxyMethods(bc, true); addProxyDateMethods(bc, type); proxySetters(bc, type); addWriteReplaceMethod(bc, runtime); return bc; }
/** * Generate the bytecode for a calendar proxy for the given type. */ protected BCClass generateProxyCalendarBytecode(Class type, boolean runtime) { assertNotFinal(type); Project project = new Project(); BCClass bc = AccessController.doPrivileged(J2DoPrivHelper .loadProjectClassAction(project, getProxyClassName(type, runtime))); bc.setSuperclass(type); bc.declareInterface(ProxyCalendar.class); delegateConstructors(bc, type); addProxyMethods(bc, true); addProxyCalendarMethods(bc, type); proxySetters(bc, type); addWriteReplaceMethod(bc, runtime); return bc; }