List of usage examples for org.objectweb.asm.tree AnnotationNode visitAnnotation
@Override
public AnnotationVisitor visitAnnotation(final String name, final String descriptor)
From source file:com.android.build.gradle.internal.incremental.InstantRunVerifierTest.java
License:Apache License
@Test public void testDiffListOnAnnotationNodesWithAnnotationNodeValue() throws Exception { AnnotationNode original = new AnnotationNode("Ltest/SomeAnnotation;"); AnnotationVisitor newAnnotation = original.visitAnnotation("InnerAnnotation", "LTest;"); newAnnotation.visit("innerEntry", "innerValue"); newAnnotation.visitEnd();//w w w .ja v a 2 s.com AnnotationNode updated = new AnnotationNode("Ltest/SomeAnnotation;"); newAnnotation = updated.visitAnnotation("InnerAnnotation", "LTest;"); newAnnotation.visit("innerEntry", "innerValue"); newAnnotation.visitEnd(); assertEquals(InstantRunVerifier.Diff.NONE, InstantRunVerifier.diffList(Lists.newArrayList(original), Lists.newArrayList(updated), InstantRunVerifier.ANNOTATION_COMPARATOR)); }