-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add testmod mixin for loading non-existent class with failing annotation
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...main/java/com/moulberry/mixinconstraints/testmod/mixin/TestMixinIntoNonExistentClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.moulberry.mixinconstraints.testmod.mixin; | ||
|
||
import com.moulberry.mixinconstraints.annotations.IfModLoaded; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
|
||
@IfModLoaded("doesntexist") | ||
@Mixin(targets = "com.doesnt.exist.Main") | ||
@Pseudo | ||
public class TestMixinIntoNonExistentClass { | ||
|
||
/* | ||
* Without the annotation there would be an error message in the logs like: | ||
* Error loading class: com/doesnt/exist/Main (java.lang.ClassNotFoundException: com/doesnt/exist/Main) | ||
* | ||
* This is undesirable, so the @IfModLoaded annotation should prevent the loading early enough for this message to not appear | ||
*/ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters