[ https://issues.apache.org/jira/browse/JDO-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732711#action_12732711 ]
Andy Jefferson commented on JDO-621: ------------------------------------ How can somebody pass in a "filename" when they are using the enhancer programmatically and they know the class name ? (e.g they have a class present called "my.pkg.MyClass") so it is somewhere in the classpath and that's all they know. Not everyone is invoking this from command lines. The method names for addXXX were based around the primary use-cases that I've come across for a typical application (and what clients are using now with this API). This "typical" app consists of multiple classes, or multiple XML files (or multiple classes + XML files), or a persistence-unit, or a jar. Yes, an app could put their model classes in multiple jars, or multiple persistence-units but then that's why we have them called addXXX. That was the reasoning anyway and I don't see where it is no longer valid. The method addFiles() taking in XML files could do with a rename anyway, since it is explicitly for metadata XML files so should state that. Yes we could *add* a generic method addFiles(...) certainly, and/or rename the addJar/addPersistenceUnit to take in plural. I'm against removal of those specific type methods though since if the user knows what type they already have then why inflict on the implementation the need to determine it again ? > Add javax.jdo.JDOEnhancerMain to call the enhancer via standard API > ------------------------------------------------------------------- > > Key: JDO-621 > URL: https://issues.apache.org/jira/browse/JDO-621 > Project: JDO > Issue Type: New Feature > Components: api2 > Affects Versions: JDO 2 maintenance release 2 > Reporter: Craig Russell > Assignee: Craig Russell > Fix For: JDO 2 maintenance release 3 > > Attachments: jdo-621.patch > > > The proposed new class will use the standard enhancer API to enhance classes. > The command line parameters would be similar to the original proposal of > JDO-591, with changes as needed to use the new class in the TCK. > java -cp classpath {enhancer-class} [options] [jdo-files] [class-files] > where options can be > -persistenceUnit persistence-unit-name : Name of a "persistence-unit" > to enhance the classes for > -d target-dir-name : Write the enhanced classes to the specified > directory > -checkonly : Just check the classes for enhancement status > -v : verbose output -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.