Top Description Inners Fields Constructors Methods
org.jruby

public Class RubyNameError

extends RubyStandardError
Class Inheritance
Known Direct Subclasses
org.jruby.RubyNoMethodError
Annotations
@JRubyClass
name:NameError
parent:StandardError
Imports
org.jcodings.specific.USASCIIEncoding, org.jruby.anno.JRubyMethod, .JRubyClass, org.jruby.api.Convert, org.jruby.ast.util.ArgsUtil, org.jruby.exceptions.NameError, .RaiseException, org.jruby.runtime.Block, .ClassIndex, .Helpers, .ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ArraySupport, .ByteList, .Sprintf, .TypeConverter, org.jruby.util.cli.Options

The Java representation of a Ruby NameError.
Author
Anders Bengtsson
See Also
NameError

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
RubyNameError.RubyNameErrorMessage

Nested class whose instances act as thunks reacting to to_str method called from (Exception#to_str, Exception#message) MRI equivalent: rb_cNameErrorMesg, class name: "message", construction method: "!", to_str implementation: "name_err_mesg_to_str"

Todo

this class should not be lookupable

Field Summary

Modifier and TypeField and Description
private IRubyObject
protected boolean
private IRubyObject

Constructor Summary

AccessConstructor and Description
protected
RubyNameError(Ruby runtime, RubyClass exceptionClass)

public
RubyNameError(Ruby runtime, RubyClass exceptionClass, String message)

public
RubyNameError(Ruby runtime, RubyClass exceptionClass, String message, String name)

public
RubyNameError(Ruby runtime, RubyClass exceptionClass, String message, IRubyObject name)

Method Summary

Modifier and TypeMethod and Description
protected RaiseException
public void
pack-priv static RubyClass
public static IRubyObject
public static RubyException
public static RubyException
public IRubyObject
public IRubyObject
initializeOptions(IRubyObject[] args, RubyHash options, Block block)

public boolean
public IRubyObject
name()

private static RubyException
pack-priv static RubyException
newNameError(ThreadContext context, IRubyObject recv, IRubyObject message, IRubyObject name, boolean privateCall)

public IRubyObject
public IRubyObject
public IRubyObject

Field Detail

nameback to summary
private IRubyObject name
privateCallback to summary
protected boolean privateCall
receiverback to summary
private IRubyObject receiver

Constructor Detail

RubyNameErrorback to summary
protected RubyNameError(Ruby runtime, RubyClass exceptionClass)
RubyNameErrorback to summary
public RubyNameError(Ruby runtime, RubyClass exceptionClass, String message)
RubyNameErrorback to summary
public RubyNameError(Ruby runtime, RubyClass exceptionClass, String message, String name)
RubyNameErrorback to summary
public RubyNameError(Ruby runtime, RubyClass exceptionClass, String message, IRubyObject name)

Method Detail

constructThrowableback to summary
protected RaiseException constructThrowable(String message)

Overrides org.jruby.RubyStandardError.constructThrowable.

Annotations
@Override
copySpecialInstanceVariablesback to summary
public void copySpecialInstanceVariables(IRubyObject clone)

Overrides org.jruby.RubyException.copySpecialInstanceVariables.

Implements org.jruby.runtime.builtin.IRubyObject.copySpecialInstanceVariables.

Doc from org.jruby.RubyBasicObject.copySpecialInstanceVariables.

Lots of MRI objects keep their state in non-lookupable ivars (e:g. Range, Struct, etc). This method is responsible for dupping our java field equivalents

Annotations
@Override
defineback to summary
pack-priv static RubyClass define(ThreadContext context, RubyClass StandardError)

Hides org.jruby.RubyStandardError.define.

exceptionback to summary
public static IRubyObject exception(ThreadContext context, IRubyObject recv)
Annotations
@JRubyMethod
name:exception
meta:true
exceptionback to summary
public static RubyException exception(ThreadContext context, IRubyObject recv, IRubyObject message)
Annotations
@JRubyMethod
name:exception
meta:true
exceptionback to summary
public static RubyException exception(ThreadContext context, IRubyObject recv, IRubyObject message, IRubyObject name)
Annotations
@JRubyMethod
name:exception
meta:true
initializeback to summary
public IRubyObject initialize(IRubyObject[] args, Block block)

Overrides org.jruby.RubyException.initialize.

Annotations
@JRubyMethod
rest:true
visibility:PRIVATE
@Override
initializeOptionsback to summary
public IRubyObject initializeOptions(IRubyObject[] args, RubyHash options, Block block)
isPrivateCallback to summary
public boolean isPrivateCall()
nameback to summary
public IRubyObject name()
Annotations
@JRubyMethod
newNameErrorback to summary
private static RubyException newNameError(ThreadContext context, IRubyObject recv, IRubyObject[] args)
newNameErrorback to summary
pack-priv static RubyException newNameError(ThreadContext context, IRubyObject recv, IRubyObject message, IRubyObject name, boolean privateCall)
private_call_pback to summary
public IRubyObject private_call_p(ThreadContext context)
Annotations
@JRubyMethod
name:private_call?
receiverback to summary
public IRubyObject receiver(ThreadContext context)
Annotations
@JRubyMethod
to_sback to summary
public IRubyObject to_s(ThreadContext context)

Overrides org.jruby.RubyException.to_s.

Annotations
@JRubyMethod
@Override
org.jruby back to summary

public final Class RubyNameError.RubyNameErrorMessage

extends RubyObject
Class Inheritance
Annotations
@JRubyClass
name:NameError::Message
parent:Object

Nested class whose instances act as thunks reacting to to_str method called from (Exception#to_str, Exception#message) MRI equivalent: rb_cNameErrorMesg, class name: "message", construction method: "!", to_str implementation: "name_err_mesg_to_str"

Todo

this class should not be lookupable

Field Summary

Modifier and TypeField and Description
private final String
private final IRubyObject
private final IRubyObject
Inherited from org.jruby.RubyObject:
IVAR_INSPECTING_OBJECT_ALLOCATOROBJECT_ALLOCATORREIFYING_OBJECT_ALLOCATOR

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
RubyNameErrorMessage(Ruby runtime, String message, IRubyObject object, IRubyObject name)

Method Summary

Modifier and TypeMethod and Description
pack-priv static RubyClass
define(ThreadContext context, RubyClass Object, RubyClass NameError)

public IRubyObject
private static RubyString
public static IRubyObject
public IRubyObject
private static IRubyObject
private static IRubyObject
Inherited from org.jruby.RubyObject:
attachToObjectSpacecallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitconvertToTypedigdig1dig2eqlInternalequalInternalequalsfinishObjectClassgetNativeClassIndexhashCodeinspectop_eqqputsspecificEvaltoRubyStringtoString

Field Detail

messageback to summary
private final String message
nameback to summary
private final IRubyObject name
objectback to summary
private final IRubyObject object

Constructor Detail

RubyNameErrorMessageback to summary
pack-priv RubyNameErrorMessage(Ruby runtime, RubyClass klazz)
RubyNameErrorMessageback to summary
pack-priv RubyNameErrorMessage(Ruby runtime, String message, IRubyObject object, IRubyObject name)

Method Detail

defineback to summary
pack-priv static RubyClass define(ThreadContext context, RubyClass Object, RubyClass NameError)
dumpback to summary
public IRubyObject dump(ThreadContext context, IRubyObject arg)
Annotations
@JRubyMethod
name:_dump
getNameOrInspectback to summary
private static RubyString getNameOrInspect(ThreadContext context, IRubyObject object)
loadback to summary
public static IRubyObject load(IRubyObject recv, IRubyObject arg)
Annotations
@JRubyMethod
name:_load
meta:true
to_strback to summary
public IRubyObject to_str(ThreadContext context)
Annotations
@JRubyMethod
tryInspectback to summary
private static IRubyObject tryInspect(ThreadContext context, IRubyObject object)
tryModuleNameback to summary
private static IRubyObject tryModuleName(ThreadContext context, IRubyObject obj)