Top Description Inners Fields Constructors Methods
org.jruby.runtime.marshal

public Class MarshalLoader

extends Object
Class Inheritance
Imports
org.jcodings.Encoding, .EncodingDB.Entry, org.jcodings.specific.ASCIIEncoding, .USASCIIEncoding, .UTF8Encoding, org.jruby.Ruby, .RubyArray, .RubyBignum, .RubyClass, .RubyEncoding, .RubyFixnum, .RubyFloat, .RubyHash, .RubyModule, .RubyObject, .RubyRegexp, .RubyString, .RubyStruct, .RubySymbol, org.jruby.api.Create, org.jruby.runtime.Constants, .Helpers, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.encoding.EncodingCapable, org.jruby.util.ByteList, .RegexpOptions, .StringSupport, org.jruby.util.io.RubyInputStream, java.util.ArrayList, .Collections, .IdentityHashMap, .List, .Map

Unmarshals objects from strings or streams in Ruby's marshal format.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final boolean
private final List<IRubyObject>
private final Map<IRubyObject, IRubyObject>
private final IRubyObject
private final List<RubySymbol>

Constructor Summary

AccessConstructor and Description
public
public
MarshalLoader(ThreadContext context, boolean freeze, IRubyObject proc)

Method Summary

Modifier and TypeMethod and Description
private void
private IRubyObject
public IRubyObject
private IRubyObject
public static RubyClass
public static RubyModule
private boolean
public void
ivar(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, IRubyObject object, boolean[] hasEncoding)

private IRubyObject
leave(ThreadContext context, IRubyObject value, boolean partial)

private void
private RubyModule
private void
private IRubyObject
object0(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
objectFor(ThreadContext context, RubyInputStream in, int type, MarshalLoader.MarshalState state, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
objectForArray(ThreadContext context, RubyInputStream in, boolean partial)

private IRubyObject
private IRubyObject
objectForClass(ThreadContext context, RubyInputStream in, boolean partial)

private IRubyObject
objectForData(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
private IRubyObject
private IRubyObject
private IRubyObject
private IRubyObject
objectForHash(ThreadContext context, RubyInputStream in, boolean partial)

private IRubyObject
objectForHashDefault(ThreadContext context, RubyInputStream in, boolean partial)

private IRubyObject
objectForIVar(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
objectForModule(ThreadContext context, RubyInputStream in, boolean partial)

private IRubyObject
private IRubyObject
private IRubyObject
objectForObject(ThreadContext context, RubyInputStream in, boolean partial)

private IRubyObject
private IRubyObject
objectForString(ThreadContext context, RubyInputStream in, boolean partial)

private IRubyObject
objectForStruct(ThreadContext context, RubyInputStream in, boolean partial)

private IRubyObject
private IRubyObject
private IRubyObject
objectForUClass(ThreadContext context, RubyInputStream in, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
private IRubyObject
private IRubyObject
private void
private int
public byte
public int
public void
public RubySymbol
private Encoding
private RubySymbol
public RubySymbol
public int
public IRubyObject
private IRubyObject
public ByteList
private IRubyObject
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

freezeback to summary
private final boolean freeze
partialsback to summary
private final Map<IRubyObject, IRubyObject> partials
procback to summary
private final IRubyObject proc
symbolsback to summary
private final List<RubySymbol> symbols

Constructor Detail

MarshalLoaderback to summary
public MarshalLoader(ThreadContext context, IRubyObject proc)
MarshalLoaderback to summary
public MarshalLoader(ThreadContext context, boolean freeze, IRubyObject proc)

Method Detail

appendExtendedModulesback to summary
private void appendExtendedModules(ThreadContext context, IRubyObject obj, List<RubyModule> extendedModules)
doCallProcForObjback to summary
private IRubyObject doCallProcForObj(ThreadContext context, IRubyObject result)
entryback to summary
public IRubyObject entry(IRubyObject value)
fixupCompatback to summary
private IRubyObject fixupCompat(IRubyObject obj)
getClassFromPathback to summary
public static RubyClass getClassFromPath(ThreadContext context, String path)
getModuleFromPathback to summary
public static RubyModule getModuleFromPath(ThreadContext context, String path)
isPartialObjectback to summary
private boolean isPartialObject(IRubyObject value)
ivarback to summary
public void ivar(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, IRubyObject object, boolean[] hasEncoding)
leaveback to summary
private IRubyObject leave(ThreadContext context, IRubyObject value, boolean partial)
markAsPartialObjectback to summary
private void markAsPartialObject(IRubyObject value)
mustBeModuleback to summary
private RubyModule mustBeModule(ThreadContext context, IRubyObject value, IRubyObject path)
noLongerPartialback to summary
private void noLongerPartial(IRubyObject value)
object0back to summary
private IRubyObject object0(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial, List<RubyModule> extendedModules)
objectForback to summary
private IRubyObject objectFor(ThreadContext context, RubyInputStream in, int type, MarshalLoader.MarshalState state, boolean partial, List<RubyModule> extendedModules)
objectForArrayback to summary
private IRubyObject objectForArray(ThreadContext context, RubyInputStream in, boolean partial)
objectForBignumback to summary
private IRubyObject objectForBignum(ThreadContext context, RubyInputStream in)
objectForClassback to summary
private IRubyObject objectForClass(ThreadContext context, RubyInputStream in, boolean partial)
objectForDataback to summary
private IRubyObject objectForData(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial, List<RubyModule> extendedModules)
objectForExtendedback to summary
private IRubyObject objectForExtended(ThreadContext context, RubyInputStream in, List<RubyModule> extendedModules)
objectForFalseback to summary
private IRubyObject objectForFalse(ThreadContext context)
objectForFixnumback to summary
private IRubyObject objectForFixnum(ThreadContext context, RubyInputStream in)
objectForFloatback to summary
private IRubyObject objectForFloat(ThreadContext context, RubyInputStream in)
objectForHashback to summary
private IRubyObject objectForHash(ThreadContext context, RubyInputStream in, boolean partial)
objectForHashDefaultback to summary
private IRubyObject objectForHashDefault(ThreadContext context, RubyInputStream in, boolean partial)
objectForIVarback to summary
private IRubyObject objectForIVar(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial, List<RubyModule> extendedModules)
objectForModuleback to summary
private IRubyObject objectForModule(ThreadContext context, RubyInputStream in, boolean partial)
objectForModuleOldback to summary
private IRubyObject objectForModuleOld(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial)
objectForNilback to summary
private IRubyObject objectForNil(ThreadContext context)
objectForObjectback to summary
private IRubyObject objectForObject(ThreadContext context, RubyInputStream in, boolean partial)
objectForRegexpback to summary
private IRubyObject objectForRegexp(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial)
objectForStringback to summary
private IRubyObject objectForString(ThreadContext context, RubyInputStream in, boolean partial)
objectForStructback to summary
private IRubyObject objectForStruct(ThreadContext context, RubyInputStream in, boolean partial)
objectForSymbolback to summary
private IRubyObject objectForSymbol(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial)
objectForTrueback to summary
private IRubyObject objectForTrue(ThreadContext context)
objectForUClassback to summary
private IRubyObject objectForUClass(ThreadContext context, RubyInputStream in, boolean partial, List<RubyModule> extendedModules)
objectForUserDefback to summary
private IRubyObject objectForUserDef(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state, boolean partial)
objectForUsrMarshalback to summary
private IRubyObject objectForUsrMarshal(ThreadContext context, RubyInputStream in, List<RubyModule> extendedModules)
postProcback to summary
private IRubyObject postProc(ThreadContext context, IRubyObject value)
prohibitIVarback to summary
private void prohibitIVar(ThreadContext context, MarshalLoader.MarshalState state, String name)
r_byteback to summary
private int r_byte(ThreadContext context, RubyInputStream in)
readSignedByteback to summary
public byte readSignedByte(ThreadContext context, RubyInputStream in)
readUnsignedByteback to summary
public int readUnsignedByte(ThreadContext context, RubyInputStream in)
startback to summary
public void start(ThreadContext context, RubyInputStream in)
symbolback to summary
public RubySymbol symbol(ThreadContext context, RubyInputStream in)
symbolToEncodingback to summary
private Encoding symbolToEncoding(ThreadContext context, RubySymbol symbol, IRubyObject value)
symrealback to summary
private RubySymbol symreal(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state)
uniqueback to summary
public RubySymbol unique(ThreadContext context, RubyInputStream in)
unmarshalIntback to summary
public int unmarshalInt(ThreadContext context, RubyInputStream in)
unmarshalObjectback to summary
public IRubyObject unmarshalObject(ThreadContext context, RubyInputStream in)
unmarshalRegexpback to summary
private IRubyObject unmarshalRegexp(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state)
unmarshalStringback to summary
public ByteList unmarshalString(ThreadContext context, RubyInputStream in)
userUnmarshalback to summary
private IRubyObject userUnmarshal(ThreadContext context, RubyInputStream in, MarshalLoader.MarshalState state)
org.jruby.runtime.marshal back to summary

private Class MarshalLoader.MarshalState

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv
MarshalState(boolean ivarWaiting)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
pack-priv void
setIvarWaiting(boolean ivarWaiting)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ivarWaitingback to summary
private boolean ivarWaiting

Constructor Detail

MarshalStateback to summary
pack-priv MarshalState(boolean ivarWaiting)

Method Detail

isIvarWaitingback to summary
pack-priv boolean isIvarWaiting()
setIvarWaitingback to summary
pack-priv void setIvarWaiting(boolean ivarWaiting)