File tree 2 files changed +67
-0
lines changed
src/compiler/scala/tools/asm
2 files changed +67
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
1
+ /* NSC -- new Scala compiler
2
+ * Copyright 2005-2012 LAMP/EPFL
3
+ */
4
+
5
+ package scala .tools .asm .util ;
6
+
7
+ import scala .tools .asm .util .CheckMethodAdapter ;
8
+ import scala .tools .asm .MethodVisitor ;
9
+
10
+ /**
11
+ * A subclass of ASM's CheckMethodAdapter for the sole purpose of accessing some protected methods there.
12
+ *
13
+ */
14
+ public class SignatureChecker extends CheckMethodAdapter {
15
+
16
+ public SignatureChecker (final MethodVisitor mv ) {
17
+ super (mv );
18
+ }
19
+
20
+ /**
21
+ * Checks a class signature.
22
+ *
23
+ * @param signature a string containing the signature that must be checked.
24
+ */
25
+ public static void checkClassSignature (final String signature ) {
26
+ CheckMethodAdapter .checkClassSignature (signature );
27
+ }
28
+
29
+ /**
30
+ * Checks a method signature.
31
+ *
32
+ * @param signature a string containing the signature that must be checked.
33
+ */
34
+ public static void checkMethodSignature (final String signature ) {
35
+ CheckMethodAdapter .checkMethodSignature (signature );
36
+ }
37
+
38
+ /**
39
+ * Checks a field signature.
40
+ *
41
+ * @param signature a string containing the signature that must be checked.
42
+ */
43
+ public static void checkFieldSignature (final String signature ) {
44
+ CheckMethodAdapter .checkFieldSignature (signature );
45
+ }
46
+
47
+ }
You can’t perform that action at this time.
0 commit comments