Package org.jruby.runtime.builtin
Interface InstanceVariables
- All Known Implementing Classes:
AbstractInvoker
,AbstractMemory
,AbstractRubyMethod
,Addrinfo
,ArrayJavaProxy
,ArrayJavaProxyCreator
,AutoPointer
,BasicObjectStub.DummyInstanceVariables
,Buffer
,CallbackInfo
,ConcreteJavaProxy
,ConditionVariable
,DynamicLibrary
,DynamicLibrary.Symbol
,Enums
,FileDescriptorIO
,Function
,Ifaddr
,IncludedModule
,IncludedModuleWrapper
,InterfaceJavaProxy
,JavaArray
,JavaClass
,JavaObject
,JavaPackage
,JavaProxy
,JavaProxyClass
,JavaProxyClass.ProxyMethodImpl
,JavaProxyConstructor
,JavaProxyReflectionObject
,JFFIInvoker
,JRubyExecutionContextLocal
,JRubyFiberLocal
,JRubyObjectInputStream
,JRubyThreadLocal
,JZlibDeflate
,JZlibInflate
,JZlibRubyGzipReader
,JZlibRubyGzipWriter
,MapJavaProxy
,MappedType
,MemoryObject
,MemoryPointer
,MetaClass
,Monitor
,Mutex
,NativeException
,Option
,Pointer
,PrependedModule
,Queue
,RubyArgsFile
,RubyArgumentError
,RubyArithmeticSequence
,RubyArray
,RubyArrayOneObject
,RubyArraySpecialized
,RubyArrayTwoObject
,RubyBasicObject
,RubyBasicSocket
,RubyBigDecimal
,RubyBignum
,RubyBinding
,RubyBoolean
,RubyBoolean.False
,RubyBoolean.True
,RubyChain
,RubyClass
,RubyClassPathVariable
,RubyComplex
,RubyConcurrencyError
,RubyContinuation
,RubyConverter
,RubyDate
,RubyDateTime
,RubyDigest.DigestBase
,RubyDigest.DigestClass
,RubyDir
,RubyDomainError
,RubyEncoding
,RubyEncodingError
,RubyEncodingError.RubyCompatibilityError
,RubyEncodingError.RubyConverterNotFoundError
,RubyEncodingError.RubyInvalidByteSequenceError
,RubyEncodingError.RubyUndefinedConversionError
,RubyEnumerator
,RubyEnumerator.FeedValue
,RubyEOFError
,RubyException
,RubyFatal
,RubyFiberError
,RubyFile
,RubyFileStat
,RubyFixnum
,RubyFloat
,RubyFloatDomainError
,RubyFrozenError
,RubyGenerator
,RubyGlobal.CaseInsensitiveStringOnlyRubyHash
,RubyGlobal.StringOnlyRubyHash
,RubyGzipFile
,RubyHash
,RubyIndexError
,RubyInteger
,RubyInterrupt
,RubyInterruptedRegexpError
,RubyIO
,RubyIO.RubyIOTimeoutError
,RubyIOBuffer
,RubyIOError
,RubyIPSocket
,RubyKeyError
,RubyLoadError
,RubyLocalJumpError
,RubyMatchData
,RubyMethod
,RubyModule
,RubyNameError
,RubyNameError.RubyNameErrorMessage
,RubyNil
,RubyNoMatchingPatternError
,RubyNoMatchingPatternKeyError
,RubyNoMemoryError
,RubyNoMethodError
,RubyNotImplementedError
,RubyNumeric
,RubyObject
,RubyObject.Data
,RubyObjectSpace.AbstractWeakMap
,RubyObjectSpace.WeakKeyMap
,RubyObjectSpace.WeakMap
,RubyPathname
,RubyProc
,RubyProcess.RubyStatus
,RubyProducer
,RubyRandom
,RubyRandomBase
,RubyRange
,RubyRangeError
,RubyRational
,RubyRegexp
,RubyRegexpError
,RubyRipper
,RubyRuntimeError
,RubyScriptError
,RubySecurityError
,RubyServerSocket
,RubySet
,RubySet.DivideTSortHash
,RubySignalException
,RubySocket
,RubySortedSet
,RubyStandardError
,RubyStopIteration
,RubyString
,RubyString.FString
,RubyStruct
,RubySymbol
,RubySyntaxError
,RubySyslog
,RubySystemCallError
,RubySystemExit
,RubySystemStackError
,RubyTCPServer
,RubyTCPSocket
,RubyThread
,RubyThread.Backtrace
,RubyThread.Location
,RubyThreadError
,RubyThreadGroup
,RubyTime
,RubyTypeError
,RubyUDPSocket
,RubyUnboundMethod
,RubyUncaughtThrowError
,RubyUNIXServer
,RubyUNIXSocket
,RubyYielder
,RubyZeroDivisionError
,SizedQueue
,StringArraySet
,Struct
,StructByValue
,StructLayout
,StructLayout.ArrayField
,StructLayout.ArrayProxy
,StructLayout.CharArrayProxy
,StructLayout.EnumField
,StructLayout.Field
,StructLayout.FunctionField
,StructLayout.InnerStructField
,StructLayout.NumberField
,StructLayout.PointerField
,ThreadFiber
,TracePoint
,Type
,Type.Array
,Type.Builtin
,VariadicInvoker
,ZStream
public interface InstanceVariables
Interface that represents the instance variable aspect of Ruby
objects.
- Author:
- headius
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Copies all instance variables from the given object into the receiverfastGetInstanceVariable
(String internedName) Deprecated.boolean
fastHasInstanceVariable
(String internedName) Deprecated.fastSetInstanceVariable
(String internedName, IRubyObject value) Deprecated.default void
forEachInstanceVariable
(BiConsumer<String, IRubyObject> accessor) Iterate over all instance variable name/value pairs for this object.default void
forEachInstanceVariableName
(Consumer<String> consumer) Iterate over all instance variable names for this object.getInstanceVariable
(String name) Returns the named instance variable if present, else null.list of instance variableslist of instance variables as Stringsboolean
hasInstanceVariable
(String name) Returns true if object has the named instance variable.removeInstanceVariable
(String name) Removes the named instance variable, if present, returning its value.setInstanceVariable
(String name, IRubyObject value) Sets the named instance variable to the specified value.
-
Method Details
-
hasInstanceVariable
Returns true if object has the named instance variable.- Parameters:
name
- the name of an instance variable- Returns:
- true if object has the named instance variable.
-
fastHasInstanceVariable
Deprecated. -
getInstanceVariable
Returns the named instance variable if present, else null.- Parameters:
name
- the name of an instance variable- Returns:
- the named instance variable if present, else null
-
fastGetInstanceVariable
Deprecated. -
setInstanceVariable
Sets the named instance variable to the specified value.- Parameters:
name
- the name of an instance variablevalue
- the value to be set- Returns:
- value
-
fastSetInstanceVariable
Deprecated. -
removeInstanceVariable
Removes the named instance variable, if present, returning its value.- Parameters:
name
- the name of the variable to remove- Returns:
- the value of the remove variable, if present; else null
-
getInstanceVariableList
List<Variable<IRubyObject>> getInstanceVariableList()list of instance variables- Returns:
- instance variables
-
getInstanceVariableNameList
list of instance variables as Strings- Returns:
- instance variable names
-
copyInstanceVariablesInto
Copies all instance variables from the given object into the receiver- Parameters:
other
- the thing to copy into
-
forEachInstanceVariable
Iterate over all instance variable name/value pairs for this object.- Parameters:
accessor
- a consumer for each variable
-
forEachInstanceVariableName
Iterate over all instance variable names for this object.- Parameters:
consumer
- consumer for the names
-