use of net.runelite.asm.attributes.annotation.Element in project runelite by runelite.
the class AnnotationMapper method copyAnnotations.
private int copyAnnotations(Annotations from, Annotations to) {
int count = 0;
if (from.getAnnotations() == null)
return count;
for (Annotation a : from.getAnnotations()) {
if (isCopyable(a)) {
Annotation annotation = new Annotation(to);
annotation.setType(a.getType());
to.addAnnotation(annotation);
for (Element e : a.getElements()) {
Element element = new Element(annotation);
element.setName(e.getName());
element.setValue(e.getValue());
annotation.addElement(element);
}
++count;
}
}
return count;
}
use of net.runelite.asm.attributes.annotation.Element in project runelite by runelite.
the class ClassAnnotationVisitor method visit.
@Override
public void visit(String name, Object value) {
Element element = new Element(annotation);
element.setName(name);
element.setValue(value);
annotation.addElement(element);
}
use of net.runelite.asm.attributes.annotation.Element in project runelite by runelite.
the class FieldAnnotationVisitor method visit.
@Override
public void visit(String name, Object value) {
Element element = new Element(annotation);
element.setName(name);
element.setValue(value);
annotation.addElement(element);
}
use of net.runelite.asm.attributes.annotation.Element in project runelite by runelite.
the class MethodAnnotationVisitor method visit.
@Override
public void visit(String name, Object value) {
Element element = new Element(annotation);
element.setName(name);
element.setValue(value);
annotation.addElement(element);
}
use of net.runelite.asm.attributes.annotation.Element in project runelite by runelite.
the class DeobAnnotations method getObfuscatedValue.
public static String getObfuscatedValue(Method method) {
if (method == null || method.getAnnotations() == null) {
return null;
}
Annotation an = method.getAnnotations().find(OBFUSCATED_SIGNATURE);
if (an == null) {
return null;
}
List<Element> elements = an.getElements();
if (elements == null || elements.size() < 2) {
return null;
}
return (String) elements.get(1).getValue();
}
Aggregations