Top Description Inners Constructors Methods
org.jruby.util

public abstract Class ASM

extends Object
Class Inheritance
Imports
org.objectweb.asm.ClassWriter

ASM helpers for JRuby.
Author
kares

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
ASM.ClassLoaderAwareWriter

Note

required to account for ASM calculating stack-map frames in which case it might need to know of JRuby's dynamically loaded classes

Constructor Summary

AccessConstructor and Description
private
ASM()

Method Summary

Modifier and TypeMethod and Description
public static ClassWriter
public static ClassWriter
public static ClassWriter
newClassWriter(ClassLoader loader, final int flags)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ASMback to summary
private ASM()

Method Detail

newClassWriterback to summary
public static ClassWriter newClassWriter()
newClassWriterback to summary
public static ClassWriter newClassWriter(ClassLoader loader)
newClassWriterback to summary
public static ClassWriter newClassWriter(ClassLoader loader, final int flags)
org.jruby.util back to summary

private Class ASM.ClassLoaderAwareWriter

extends ClassWriter
Class Inheritance

Note

required to account for ASM calculating stack-map frames in which case it might need to know of JRuby's dynamically loaded classes

Author
kares

Field Summary

Modifier and TypeField and Description
private final ClassLoader
Inherited from org.objectweb.asm.ClassWriter:
COMPUTE_FRAMESCOMPUTE_MAXS

Constructor Summary

AccessConstructor and Description
pack-priv
ClassLoaderAwareWriter(final ClassLoader loader, final int flags)

Method Summary

Modifier and TypeMethod and Description
protected String
getCommonSuperClass(String
the internal name of a class (see Type#getInternalName()).
type1
,
String
the internal name of another class (see Type#getInternalName()).
type2
)

Overrides org.objectweb.asm.ClassWriter.getCommonSuperClass.

Returns the common super type of the two given types.

private static String
getCommonSuperClassImpl(String type1, String type2, final ClassLoader loader)

Inherited from org.objectweb.asm.ClassWriter:
getClassLoaderhasFlagsnewClassnewConstnewConstantDynamicnewFieldnewHandlenewHandlenewInvokeDynamicnewMethodnewMethodTypenewModulenewNameTypenewPackagenewUTF8toByteArrayvisitvisitAnnotationvisitAttributevisitEndvisitFieldvisitInnerClassvisitMethodvisitModulevisitNestHostvisitNestMembervisitOuterClassvisitPermittedSubclassvisitRecordComponentvisitSourcevisitTypeAnnotation

Field Detail

loaderback to summary
private final ClassLoader loader

Constructor Detail

ClassLoaderAwareWriterback to summary
pack-priv ClassLoaderAwareWriter(final ClassLoader loader, final int flags)

Method Detail

getCommonSuperClassback to summary
protected String getCommonSuperClass(String type1, String type2)

Overrides org.objectweb.asm.ClassWriter.getCommonSuperClass.

Doc from org.objectweb.asm.ClassWriter.getCommonSuperClass.

Returns the common super type of the two given types. The default implementation of this method loads the two given classes and uses the java.lang.Class methods to find the common super class. It can be overridden to compute this common super type in other ways, in particular without actually loading any class, or to take into account the class that is currently being generated by this ClassWriter, which can of course not be loaded since it is under construction.

Parameters
type1:String

the internal name of a class (see Type#getInternalName()).

type2:String

the internal name of another class (see Type#getInternalName()).

Returns:String

the internal name of the common super class of the two given classes (see Type#getInternalName()).

Annotations
@Override
getCommonSuperClassImplback to summary
private static String getCommonSuperClassImpl(String type1, String type2, final ClassLoader loader) throws TypeNotPresentException