forked from scala/scala
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
two ASM-based classes in fjbg.jar allow using standard asm 4.0 jars
- Loading branch information
1 parent
ef8deaa
commit cebc82d
Showing
4 changed files
with
78 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* NSC -- new Scala compiler | ||
* Copyright 2005-2012 LAMP/EPFL | ||
*/ | ||
|
||
package org.objectweb.asm; | ||
|
||
import org.objectweb.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); | ||
/* The next line depends on asm-4.0.jar ie the shrinked version. | ||
When using, say, asm-debug-all-4.0.jar, the assignment should read `super.value = value;` */ | ||
super.b = value; | ||
} | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* NSC -- new Scala compiler | ||
* Copyright 2005-2012 LAMP/EPFL | ||
*/ | ||
|
||
package org.objectweb.asm.util; | ||
|
||
import org.objectweb.asm.util.CheckMethodAdapter; | ||
import org.objectweb.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); | ||
} | ||
|
||
} |