Skip to content

Commit 9a7e518

Browse files
magarciaEPFLlrytz
authored andcommitted
[asm-cherry-pick] asm.CustomAttribute class
Allows creating an asm.Attribute and directly providing the content as a byte array. Cherry-pick of f994343. Only `CustomAttr.java` is kept, the file `SignatureChecker.java` has been removed in f9053e5.
1 parent 97063ed commit 9a7e518

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* NSC -- new Scala compiler
2+
* Copyright 2005-2012 LAMP/EPFL
3+
*/
4+
5+
package scala.tools.asm;
6+
7+
import scala.tools.asm.Attribute;
8+
9+
/**
10+
* A subclass of ASM's Attribute for the sole purpose of accessing a protected field there.
11+
*
12+
*/
13+
public class CustomAttr extends Attribute {
14+
15+
public CustomAttr(final String type, final byte[] value) {
16+
super(type);
17+
super.value = value;
18+
}
19+
20+
}

0 commit comments

Comments
 (0)