|
public static <T> T getValue(AnnotationNode annotation, String key) { |
|
boolean getNextValue = false; |
|
|
|
if (annotation == null || annotation.values == null) { |
|
return null; |
|
} |
|
|
|
// Keys and value are stored in successive pairs, search for the key and if found return the following entry |
|
for (Object value : annotation.values) { |
|
if (getNextValue) { |
|
return (T) value; |
|
} |
|
if (value.equals(key)) { |
|
getNextValue = true; |
|
} |
|
} |
|
|
|
return null; |
|
} |
This can very easily be seen with an @At(id = "shift", ...), but it is likely a problem in many areas.
Mixin/src/main/java/org/spongepowered/asm/util/Annotations.java
Lines 554 to 572 in 4053421
This can very easily be seen with an
@At(id = "shift", ...), but it is likely a problem in many areas.