[ https://issues.apache.org/jira/browse/JDO-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657084#action_12657084 ]
Andy Jefferson commented on JDO-591: ------------------------------------ What bearing does "subdirectories" have on the input from addPersistenceUnit(), or addClass() ? nothing IMHO, hence why I suggest it is separate. A persistence-unit is not a file, neither is what is input into addClass(). Classes and mappingfiles *can* be files (though the "classes" may not be, instead could be some resource in the classpath) so potentially could be impacted by some subdirectories flag - one way would be :- addPersistenceUnit(String); addClass(String, byte[]); addMappingFiles(boolean subdirs, String... filenames); addClassFiles(boolean subdirs, String filenames); addClasses(String... classnames); or you merge the addMappingFiles/addClassFiles into addFiles(). WRT "add(String[] ...)" how does the impl know if it is a persistence-unit, or a mapping file, or a class file, or a wildcard, or a directory name, or some random junk ? the impl has to spend its time traversing "persistence.xml", and directories and files, and open them and see whats inside? No I don't like that, sorry. Presumably there needs to be addExtension(String option); to comply with what is discussed in JDO-621. > Enhancer Invocation API > ----------------------- > > Key: JDO-591 > URL: https://issues.apache.org/jira/browse/JDO-591 > Project: JDO > Issue Type: New Feature > Components: api2 > Reporter: Andy Jefferson > Assignee: Andy Jefferson > Fix For: JDO 2 maintenance release 3 > > Attachments: jdoenhancer-5.patch > > > Having a standard interface to invoke the enhancer makes a lot of sense so we > can have interchangeability of enhancers (for implementations that support > BinaryCompatibility). > A start point (for discussions) could be > 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 then allows enhancement of the specified classes, or the classes defined > by the specified JDO files, or the classes defined by the specified > persistence-unit. > What other control would people like to see ? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.