use of com.googlecode.d2j.dex.writer.ev.EncodedAnnotation.AnnotationElement in project dex2jar by pxb1988.
the class AnnotationWriter method newAnnotationElement.
AnnotationElement newAnnotationElement(String name) {
AnnotationElement ae = new AnnotationElement();
ae.name = cp.uniqString(name);
elements.add(ae);
return ae;
}
use of com.googlecode.d2j.dex.writer.ev.EncodedAnnotation.AnnotationElement in project dex2jar by pxb1988.
the class AnnotationWriter method visitAnnotation.
@Override
public DexAnnotationVisitor visitAnnotation(String name, String desc) {
EncodedValue encodedValue;
EncodedAnnotation encodedAnnotation = new EncodedAnnotation();
encodedAnnotation.type = cp.uniqType(desc);
encodedValue = new EncodedValue(EncodedValue.VALUE_ANNOTATION, encodedAnnotation);
AnnotationElement ae = newAnnotationElement(name);
ae.value = encodedValue;
return new AnnotationWriter(encodedAnnotation.elements, cp);
}
use of com.googlecode.d2j.dex.writer.ev.EncodedAnnotation.AnnotationElement in project dex2jar by pxb1988.
the class AnnotationWriter method visit.
// int,int long
public void visit(String name, Object value) {
if (value instanceof Object[]) {
DexAnnotationVisitor s = visitArray(name);
if (s != null) {
for (Object v : (Object[]) value) {
s.visit(null, v);
}
s.visitEnd();
}
} else {
AnnotationElement ae = newAnnotationElement(name);
ae.value = EncodedValue.wrap(cp.wrapEncodedItem(value));
}
}
use of com.googlecode.d2j.dex.writer.ev.EncodedAnnotation.AnnotationElement in project dex2jar by pxb1988.
the class AnnotationWriter method visitEnum.
@Override
public void visitEnum(String name, String fower, String fname) {
AnnotationElement ae = newAnnotationElement(name);
ae.value = new EncodedValue(EncodedValue.VALUE_ENUM, cp.uniqField(fower, fname, fower));
}
use of com.googlecode.d2j.dex.writer.ev.EncodedAnnotation.AnnotationElement in project dex2jar by pxb1988.
the class AnnotationWriter method visitArray.
@Override
public DexAnnotationVisitor visitArray(String name) {
AnnotationElement ae = newAnnotationElement(name);
final EncodedArray encodedArray = new EncodedArray();
ae.value = new EncodedValue(EncodedValue.VALUE_ARRAY, encodedArray);
return new EncodedArrayAnnWriter(encodedArray);
}
Aggregations