mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-26 13:53:05 +00:00
Add property to injectors to specify max allowed injections, closes #195
This commit is contained in:
1 parent
55777fcf42
commit
f08fc3bb2a
11 files changed
+179
-21
No files matched your search
@@ -24,8 +24,6 @@
|
||||
*/
|
||||
package org.spongepowered.asm.util;
|
||||
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -38,6 +36,8 @@ import org.spongepowered.asm.lib.tree.ClassNode;
|
||||
import org.spongepowered.asm.lib.tree.FieldNode;
|
||||
import org.spongepowered.asm.lib.tree.MethodNode;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
/**
|
||||
* Utility class for working with ASM annotations
|
||||
*/
|
||||
@@ -351,7 +351,7 @@ public final class Annotations {
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T getValue(AnnotationNode annotation, String key, Class<?> annotationClass) {
|
||||
checkNotNull(annotationClass, "annotationClass cannot be null");
|
||||
Preconditions.checkNotNull(annotationClass, "annotationClass cannot be null");
|
||||
T value = Annotations.getValue(annotation, key);
|
||||
if (value == null) {
|
||||
try {
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
*/
|
||||
package org.spongepowered.asm.util;
|
||||
|
||||
import static org.spongepowered.asm.lib.ClassWriter.*;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.annotation.Annotation;
|
||||
@@ -319,7 +317,7 @@ public final class Bytecode {
|
||||
* @param classNode the classNode to verify
|
||||
*/
|
||||
public static void dumpClass(ClassNode classNode) {
|
||||
ClassWriter cw = new ClassWriter(COMPUTE_MAXS | COMPUTE_FRAMES);
|
||||
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES);
|
||||
classNode.accept(cw);
|
||||
Bytecode.dumpClass(cw.toByteArray());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user