SHRINKWRAP-402 Add support for checking the type of the Archive #53

Open
wants to merge 1 commit into
from

Projects

None yet

2 participants

@aslakknutsen
ShrinkWrap member

The new method Archive.isOfType(Class<? extends Archive<?>>) can be used to verify if a given Archive is of a given ArchiveType.
The check matches the Archive.name against the ArchiveTypes extension mapping.

ShrinkWrap.create(JavaArchive.class).isOfType(WebArchive.class) == false
ShrinkWrap.create(JavaArchive.class, "my.war").isOfType(WebArchive.class) == true
ShrinkWrap.create(MySpecialWebArchive.class, "my.war").isOfType(WebArchive.class) == true

@aslakknutsen aslakknutsen SHRINKWRAP-402 Add support for checking the type of the Archive
The new method Archive.isOfType(Class<? extends Archive<?>>) can be used to verify if a given Archive is of a given ArchiveType.
The check matches the Archive.name against the ArchiveTypes extension mapping.

ShrinkWrap.create(JavaArchive.class).isOfType(WebArchive.class) == false
ShrinkWrap.create(JavaArchive.class, "my.war").isOfType(WebArchive.class) == true
ShrinkWrap.create(MySpecialWebArchive.class, "my.war").isOfType(WebArchive.class) == true
6061261
@ALRubinger
ShrinkWrap member

As mentioned to Aslak on IRC, I suspect this issue may be out-of-scope for SW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment