Skip to content
This repository was archived by the owner on Feb 23, 2018. It is now read-only.

Commit decf106

Browse files
lrytzCarsten Varming
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 lrytz/scala@9a7e518
1 parent e8885eb commit decf106

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)