Skip to content
Permalink
Browse files
glue ASM <-> GenASM, the only part of scala.tools.asm to maintain man…
…ually
  • Loading branch information
magarciaEPFL committed May 8, 2012
1 parent df4df0a commit f9943432a6ce13c770927c4ffc184887daa101f2
@@ -0,0 +1,20 @@
/* NSC -- new Scala compiler
* Copyright 2005-2012 LAMP/EPFL
*/

package scala.tools.asm;

import scala.tools.asm.Attribute;

/**
* A subclass of ASM's Attribute for the sole purpose of accessing a protected field there.
*
*/
public class CustomAttr extends Attribute {

public CustomAttr(final String type, final byte[] value) {
super(type);
super.value = value;
}

}
@@ -0,0 +1,47 @@
/* NSC -- new Scala compiler
* Copyright 2005-2012 LAMP/EPFL
*/

package scala.tools.asm.util;

import scala.tools.asm.util.CheckMethodAdapter;
import scala.tools.asm.MethodVisitor;

/**
* A subclass of ASM's CheckMethodAdapter for the sole purpose of accessing some protected methods there.
*
*/
public class SignatureChecker extends CheckMethodAdapter {

public SignatureChecker(final MethodVisitor mv) {
super(mv);
}

/**
* Checks a class signature.
*
* @param signature a string containing the signature that must be checked.
*/
public static void checkClassSignature(final String signature) {
CheckMethodAdapter.checkClassSignature(signature);
}

/**
* Checks a method signature.
*
* @param signature a string containing the signature that must be checked.
*/
public static void checkMethodSignature(final String signature) {
CheckMethodAdapter.checkMethodSignature(signature);
}

/**
* Checks a field signature.
*
* @param signature a string containing the signature that must be checked.
*/
public static void checkFieldSignature(final String signature) {
CheckMethodAdapter.checkFieldSignature(signature);
}

}

0 comments on commit f994343

Please sign in to comment.