[shrinkwrap-issues] [JBoss JIRA] (SHRINKWRAP-436) Support recursive Class addition
Michal Matloka (JIRA)
jira-events at lists.jboss.org
Fri Nov 23 18:03:21 EST 2012
Michal Matloka created SHRINKWRAP-436:
-----------------------------------------
Summary: Support recursive Class addition
Key: SHRINKWRAP-436
URL: https://issues.jboss.org/browse/SHRINKWRAP-436
Project: ShrinkWrap
Issue Type: Feature Request
Components: api, impl-base
Reporter: Michal Matloka
Assignee: Michal Matloka
I'd like propose to add e.g the following methods to the API:
addClass(boolean recursive, Class<?> clazz)
addClass(boolean recursive, int depth, Class<?> clazz)
They would add to the archive, given clazz, and all other classes mentioned in clazz, e.g
For the following class strcture
{noformat}
private static final class DummyRecursiveA {
private DummyRecursiveB dummyRecursiveB;
}
private static final class DummyRecursiveB {
}
{noformat}
operation .addClass(true, DummyRecursiveA.class) would result in adding both DummyRecursiveA and DummyRecursiveB to the archive.
It is possible to achieve, e.g. using ASM library - as described in answer of the following topic http://stackoverflow.com/questions/3734825/find-out-which-classes-of-a-given-api-are-used
I've locally prepared proof of concept based on stackoverflow, after some refactorings I will present the pull request.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the shrinkwrap-issues
mailing list