Package org.jruby
Class RubyClass.ConcreteJavaReifier
java.lang.Object
org.jruby.RubyClass.ConcreteJavaReifier
- Enclosing class:
RubyClass
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.objectweb.asm.ClassWriter
protected final String
final String
protected final JavaClassConfiguration
final Class
<?> static final String
static final String
static final String
static final String
protected static final String
final String
final String
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
allocAndInitialize
(SkinnyMethodAdapter m, boolean initIfAllowed) void
protected String
defineInstanceMethod
(ThreadContext context, String id, String callid, Signature sig, PositionAware position, Class<?>[] methodSignature) protected void
defineInstanceMethods
(ThreadContext context, Set<String> instanceMethods) protected void
Override to save more values from the array inreifyClinit(SkinnyMethodAdapter)
protected void
Generates an init barrier.protected void
generateSuperBridges
(String javaMethodName, Class<?>[] methodSignature) protected Object[]
protected boolean
Class[]
protected void
Loads self (if local) or the rubyObject (if a java proxy) cast to a RubyBasicObject, as everything is a RBO and it has a nicer interfacebyte[]
reify()
void
This method generates <clinit> by marshaling the Ruby, RubyClass, etc variables through a static map identified by integer in JavaProxyClass.protected void
void
rubycall
(SkinnyMethodAdapter m, String signature) protected Collection
<Class<?>[]> protected Collection
<Class<?>[]> searchInheritedSignatures
(String id, Signature arity)
-
Field Details
-
RUBY_OBJECT_FIELD
- See Also:
-
RUBY_PROXY_CLASS_FIELD
- See Also:
-
RUBY_CTOR_CACHE_FIELD
- See Also:
-
reifiedParent
-
javaName
-
javaPath
-
rubyName
-
rubyPath
-
jcc
-
cw
protected final org.objectweb.asm.ClassWriter cw -
RUBY_FIELD
- See Also:
-
RUBY_CLASS_FIELD
- See Also:
-
-
Method Details
-
customReify
public void customReify() -
loadRubyObject
Loads self (if local) or the rubyObject (if a java proxy) cast to a RubyBasicObject, as everything is a RBO and it has a nicer interface -
reify
public byte[] reify() -
isRubyObject
protected boolean isRubyObject() -
getExtraClinitInfo
-
extraClinitLookup
Override to save more values from the array inreifyClinit(SkinnyMethodAdapter)
-
generateSuperBridges
-
searchInheritedSignatures
-
reifyConstructors
protected void reifyConstructors() -
generateObjectBarrier
Generates an init barrier. NOT Thread-safe, but hopefully nobody has threads in their constructor? This is used to ensure that self.to_java is valid if the super ctor calls an abstract method that is re-implemented by ruby -
defineInstanceMethods
-
defineInstanceMethod
protected String defineInstanceMethod(ThreadContext context, String id, String callid, Signature sig, PositionAware position, Class<?>[] methodSignature) -
reifyClinit
This method generates <clinit> by marshaling the Ruby, RubyClass, etc variables through a static map identified by integer in JavaProxyClass. Integers are serializable through bytecode generation so we can share arbitrary objects with the generated class by saving them ingetExtraClinitInfo()
viaJavaProxyClass.addStaticInitLookup(Object...)
andJavaProxyClass.getStaticInitLookup(int)
-
searchClassMethods
-
rubycall
-
allocAndInitialize
-
join
-