Logo Search packages:      
Sourcecode: jruby1.1 version File versions

org::jruby::RubyFixnum Class Reference

Inheritance diagram for org::jruby::RubyFixnum:

org::jruby::RubyInteger org::jruby::RubyNumeric org::jruby::RubyObject org::jruby::runtime::builtin::IRubyObject org::jruby::runtime::builtin::InstanceVariables org::jruby::runtime::builtin::InternalVariables

List of all members.


Detailed Description

Implementation of the Fixnum class.

Definition at line 59 of file RubyFixnum.java.


Public Member Functions

IRubyObject abs (ThreadContext context)
IRubyObject abs ()
void addFinalizer (IRubyObject finalizer)
IRubyObject anyToString ()
IRubyObject arg (ThreadContext context)
IRubyObject as (Class javaClass)
String asJavaString ()
RubyNumeric asNumeric ()
RubyString asString ()
void attachToObjectSpace ()
final void callInit (IRubyObject[] args, Block block)
final IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject arg)
final IRubyObject callMethod (ThreadContext context, int methodIndex, String name)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, Block block)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject arg)
final IRubyObject callMethod (ThreadContext context, String name)
IRubyObject callSuper (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject ceil ()
IRubyObject checkArrayType ()
IRubyObject checkStringType ()
RubyString chr ()
IRubyObject coerce (IRubyObject other)
IRubyObject conjugate (ThreadContext context)
RubyArray convertToArray ()
RubyFloat convertToFloat ()
RubyHash convertToHash ()
RubyInteger convertToInteger (int convertMethodIndex, String convertMethod)
RubyInteger convertToInteger ()
RubyString convertToString ()
final IRubyObject convertToType (RubyClass target, int convertMethodIndex)
synchronized Object dataGetStruct ()
synchronized void dataWrapStruct (Object obj)
IRubyObject denominator (ThreadContext context)
IRubyObject display (ThreadContext context, IRubyObject[] args)
IRubyObject div (ThreadContext context, IRubyObject other)
IRubyObject div_div (ThreadContext context, IRubyObject other)
IRubyObject divmod (ThreadContext context, IRubyObject other)
IRubyObject downto (ThreadContext context, IRubyObject to, Block block)
IRubyObject dup ()
final boolean eql (IRubyObject other)
IRubyObject eql_p (IRubyObject obj)
IRubyObject eql_p (ThreadContext context, IRubyObject other)
IRubyObject equal_p (ThreadContext context, IRubyObject obj)
boolean equals (Object other)
IRubyObject evalUnder (final ThreadContext context, RubyModule under, RubyString src, String file, int line)
IRubyObject evalUnder (final ThreadContext context, RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line)
RubyBoolean even_p ()
IRubyObject extend (IRubyObject[] args)
IRubyObject fastGetInstanceVariable (String internedName)
IRubyObject fastGetInternalVariable (String internedName)
boolean fastHasInstanceVariable (String internedName)
boolean fastHasInternalVariable (String internedName)
IRubyObject fastSetInstanceVariable (String internedName, IRubyObject value)
void fastSetInternalVariable (String internedName, IRubyObject value)
IRubyObject fdiv (ThreadContext context, IRubyObject other)
IRubyObject floor ()
IRubyObject freeze (ThreadContext context)
RubyBoolean frozen_p (ThreadContext context)
double getDoubleValue ()
final boolean getFlag (int flag)
IRubyObject getInstanceVariable (String name)
List< Variable< IRubyObject > > getInstanceVariableList ()
List< String > getInstanceVariableNameList ()
InstanceVariables getInstanceVariables ()
IRubyObject getInternalVariable (String name)
List< Variable< IRubyObject > > getInternalVariableList ()
InternalVariables getInternalVariables ()
Class<?> getJavaClass ()
long getLongValue ()
final RubyClass getMetaClass ()
int getNativeTypeIndex ()
final Ruby getRuntime ()
RubyClass getSingletonClass ()
RubyClass getType ()
int getVariableCount ()
List< Variable< IRubyObject > > getVariableList ()
Map getVariableMap ()
List< String > getVariableNameList ()
RubyFixnum hash ()
final int hashCode ()
boolean hasInstanceVariable (String name)
boolean hasInternalVariable (String name)
boolean hasVariables ()
IRubyObject id ()
IRubyObject id2name ()
synchronized IRubyObject id_deprecated ()
IRubyObject idiv (ThreadContext context, IRubyObject other, String method)
IRubyObject im (ThreadContext context)
IRubyObject image (ThreadContext context)
IRubyObject infectBy (IRubyObject obj)
IRubyObject initialize ()
IRubyObject initialize_copy (IRubyObject arg)
IRubyObject inspect ()
IRubyObject instance_eval (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, Block block)
IRubyObject instance_eval (ThreadContext context, Block block)
IRubyObject instance_exec (ThreadContext context, IRubyObject[] args, Block block)
RubyBoolean instance_of_p (ThreadContext context, IRubyObject type)
IRubyObject instance_variable_defined_p (ThreadContext context, IRubyObject name)
IRubyObject instance_variable_get (ThreadContext context, IRubyObject name)
IRubyObject instance_variable_set (IRubyObject name, IRubyObject value)
RubyArray instance_variables (ThreadContext context)
IRubyObject integer_p ()
boolean isClass ()
final boolean isFalse ()
boolean isFrozen ()
boolean isImmediate ()
boolean isModule ()
final boolean isNil ()
boolean isTaint ()
final boolean isTrue ()
RubyBoolean kind_of_p (ThreadContext context, IRubyObject type)
RubyClass makeMetaClass (RubyClass superClass)
IRubyObject method (IRubyObject symbol)
IRubyObject methods (ThreadContext context, IRubyObject[] args)
IRubyObject modulo (ThreadContext context, IRubyObject other)
RubyFixnum newFixnum (long newValue)
IRubyObject nil_p (ThreadContext context)
IRubyObject nonzero_p (ThreadContext context)
IRubyObject numerator (ThreadContext context)
RubyBoolean odd_p ()
IRubyObject op_and (ThreadContext context, IRubyObject other)
IRubyObject op_aref (IRubyObject other)
IRubyObject op_cmp (IRubyObject other)
IRubyObject op_cmp (ThreadContext context, IRubyObject other)
IRubyObject op_div (ThreadContext context, IRubyObject other)
IRubyObject op_eqq (ThreadContext context, IRubyObject other)
IRubyObject op_equal (ThreadContext context, IRubyObject other)
IRubyObject op_ge (ThreadContext context, IRubyObject other)
IRubyObject op_gt (ThreadContext context, IRubyObject other)
IRubyObject op_le (ThreadContext context, IRubyObject other)
IRubyObject op_lshift (IRubyObject other)
IRubyObject op_lt (ThreadContext context, IRubyObject other)
IRubyObject op_match (ThreadContext context, IRubyObject arg)
IRubyObject op_minus (ThreadContext context, IRubyObject other)
IRubyObject op_mod (ThreadContext context, IRubyObject other)
IRubyObject op_mul (ThreadContext context, IRubyObject other)
IRubyObject op_neg ()
IRubyObject op_or (ThreadContext context, IRubyObject other)
IRubyObject op_plus (ThreadContext context, IRubyObject other)
IRubyObject op_pow (ThreadContext context, IRubyObject other)
IRubyObject op_pow_19 (ThreadContext context, IRubyObject other)
IRubyObject op_rshift (IRubyObject other)
IRubyObject op_uminus (ThreadContext context)
IRubyObject op_uminus ()
IRubyObject op_uplus ()
IRubyObject op_xor (ThreadContext context, IRubyObject other)
IRubyObject polar (ThreadContext context)
IRubyObject pred ()
IRubyObject private_methods (ThreadContext context, IRubyObject[] args)
IRubyObject protected_methods (ThreadContext context, IRubyObject[] args)
IRubyObject public_methods (ThreadContext context, IRubyObject[] args)
IRubyObject quo (ThreadContext context, IRubyObject other)
IRubyObject quo_19 (ThreadContext context, IRubyObject other)
IRubyObject rbClone ()
IRubyObject re (ThreadContext context)
IRubyObject real (ThreadContext context)
IRubyObject remainder (ThreadContext context, IRubyObject dividend)
IRubyObject remove_instance_variable (ThreadContext context, IRubyObject name, Block block)
void removeFinalizers ()
IRubyObject removeInstanceVariable (String name)
IRubyObject removeInternalVariable (String name)
RubyBoolean respond_to_p (IRubyObject mname, IRubyObject includePrivate)
RubyBoolean respond_to_p (IRubyObject mname)
final boolean respondsTo (String name)
IRubyObject round ()
 RubyFixnum (Ruby runtime, long value)
 RubyFixnum (Ruby runtime)
IRubyObject sadded (IRubyObject name)
IRubyObject scalar_p ()
IRubyObject send (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, Block block)
IRubyObject send (ThreadContext context, Block block)
final void setFlag (int flag, boolean set)
void setFrozen (boolean frozen)
IRubyObject setInstanceVariable (String name, IRubyObject value)
void setInternalVariable (String name, IRubyObject value)
void setMetaClass (RubyClass metaClass)
void setTaint (boolean taint)
RubyArray singleton_methods (ThreadContext context, IRubyObject[] args)
IRubyObject size ()
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject[] args, Block block)
IRubyObject step (ThreadContext context, IRubyObject to, IRubyObject step, Block block)
IRubyObject step (ThreadContext context, IRubyObject arg0, Block block)
IRubyObject step (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject succ (ThreadContext context)
void syncVariables (List< Variable< IRubyObject >> variables)
IRubyObject taint (ThreadContext context)
RubyBoolean tainted_p (ThreadContext context)
IRubyObject times (ThreadContext context, Block block)
RubyArray to_a ()
IRubyObject to_c (ThreadContext context)
IRubyObject to_f ()
RubyInteger to_i ()
IRubyObject to_int (ThreadContext context)
IRubyObject to_java ()
IRubyObject to_r (ThreadContext context)
RubyString to_s (IRubyObject arg0)
RubyString to_s ()
RubyString to_s (IRubyObject[] args)
IRubyObject to_sym ()
String toString ()
IRubyObject truncate ()
RubyClass type ()
RubyClass type_deprecated ()
IRubyObject untaint (ThreadContext context)
IRubyObject upto (ThreadContext context, IRubyObject to, Block block)
IRubyObject zero_p (ThreadContext context)
IRubyObject zero_p ()

Static Public Member Functions

static void checkInt (IRubyObject arg, long num)
static RubyClass createFixnumClass (Ruby runtime)
static RubyClass createIntegerClass (Ruby runtime)
static RubyClass createNumericClass (Ruby runtime)
static RubyClass createObjectClass (Ruby runtime, RubyClass objectClass)
static IRubyObject dbl2num (Ruby runtime, double val)
static IRubyObject dbl_cmp (Ruby runtime, double a, double b)
static RubyBoolean even_p (ThreadContext context, IRubyObject recv)
static RubyFixnum five (Ruby runtime)
static int fix2int (IRubyObject arg)
static long fix2long (IRubyObject arg)
static RubyFixnum four (Ruby runtime)
static IRubyObject induced_from (ThreadContext context, IRubyObject recv, IRubyObject other)
static IRubyObject induced_from (IRubyObject recv, IRubyObject other)
static RubyNumeric int2fix (Ruby runtime, long val)
static RubyFixnum minus_one (Ruby runtime)
static RubyFixnum newFixnum (Ruby runtime, long value)
static RubyNumeric newNumeric (Ruby runtime)
static byte num2chr (IRubyObject arg)
static double num2dbl (IRubyObject arg)
static IRubyObject num2fix (IRubyObject val)
static int num2int (IRubyObject arg)
static long num2long (IRubyObject arg)
static RubyBoolean odd_p (ThreadContext context, IRubyObject recv)
static RubyFixnum one (Ruby runtime)
static IRubyObject pred (ThreadContext context, IRubyObject recv)
static void puts (Object obj)
static RubyFloat str2fnum (Ruby runtime, RubyString arg, boolean strict)
static RubyFloat str2fnum (Ruby runtime, RubyString arg)
static RubyInteger str2inum (Ruby runtime, RubyString str, int base, boolean strict)
static RubyInteger str2inum (Ruby runtime, RubyString str, int base)
static RubyFixnum three (Ruby runtime)
static RubyFixnum two (Ruby runtime)
static RubyFixnum unmarshalFrom (UnmarshalStream input) throws java.io.IOException
static RubyFixnum zero (Ruby runtime)

Static Public Attributes

static final int ALL_F = -1
static double DBL_EPSILON = 2.2204460492503131e-16
static final int FALSE_F = 1 << 0
static final int FL_USHIFT = 4
static final int FROZEN_F = 1 << 2
static final long MAX = (1L<<(BIT_SIZE - 1)) - 1
static final long MAX_MARSHAL_FIXNUM = (1L << 30) - 1
static final long MIN = -1 * MAX - 1
static final long MIN_MARSHAL_FIXNUM = - (1L << 30)
static final IRubyObject NEVER = new RubyObject()
static final int NIL_F = 1 << 1
static final IRubyObject[] NULL_ARRAY = new IRubyObject[0]
static final ObjectAllocator OBJECT_ALLOCATOR
static final long SIGN_BIT = (1L << (BIT_SIZE - 1))
static final int TAINTED_F = 1 << 3
static final IRubyObject UNDEF = new RubyObject()
static final int USER0_F = (1<<(FL_USHIFT+0))
static final int USER1_F = (1<<(FL_USHIFT+1))
static final int USER2_F = (1<<(FL_USHIFT+2))
static final int USER3_F = (1<<(FL_USHIFT+3))
static final int USER4_F = (1<<(FL_USHIFT+4))
static final int USER5_F = (1<<(FL_USHIFT+5))
static final int USER6_F = (1<<(FL_USHIFT+6))
static final int USER7_F = (1<<(FL_USHIFT+7))

Protected Member Functions

IRubyObject callCoerced (ThreadContext context, String method, IRubyObject other)
IRubyObject callCoerced (ThreadContext context, String method, IRubyObject other, boolean err)
void checkFrozen ()
final IRubyObject coerceBin (ThreadContext context, String method, IRubyObject other)
final IRubyObject coerceBody (ThreadContext context, IRubyObject other)
final IRubyObject coerceCmp (ThreadContext context, String method, IRubyObject other)
final IRubyObject coerceRelOp (ThreadContext context, String method, IRubyObject other)
void copySpecialInstanceVariables (IRubyObject clone)
final RubyArray doCoerce (ThreadContext context, IRubyObject other, boolean err)
void ensureInstanceVariablesSettable ()
IRubyObject[] getCoerced (ThreadContext context, IRubyObject other, boolean error)
RubyClass getSingletonClassClone ()
final IRubyObject op_num_equal (ThreadContext context, IRubyObject other)
final void testFrozen (String message)
RubyFloat toFloat ()
String validateInstanceVariable (String name)
boolean variableTableContains (String name)
boolean variableTableFastContains (String internedName)
IRubyObject variableTableFastFetch (String internedName)
IRubyObject variableTableFastStore (String internedName, IRubyObject value)
IRubyObject variableTableFetch (String name)
Map variableTableGetMap (Map map)
Map variableTableGetMap ()
int variableTableGetSize ()
VariableTableEntry[] variableTableGetTable ()
synchronized IRubyObject variableTableReadLocked (VariableTableEntry entry)
final VariableTableEntry[] variableTableRehash ()
IRubyObject variableTableRemove (String name)
IRubyObject variableTableStore (String name, IRubyObject value)
void variableTableSync (List< Variable< IRubyObject >> vars)

Static Protected Member Functions

static boolean eqlInternal (final ThreadContext context, final IRubyObject that, final IRubyObject other)
static boolean equalInternal (final ThreadContext context, final IRubyObject that, final IRubyObject other)
static final boolean isRubyVariable (String name)

Protected Attributes

transient Object dataStruct
int flags
transient RubyClass metaClass
transient volatile
VariableTableEntry[] 
variableTable
transient int variableTableSize
transient int variableTableThreshold

Static Protected Attributes

static final String ERR_INSECURE_SET_INST_VAR = "Insecure: can't modify instance variable"
static final ObjectAllocator NUMERIC_ALLOCATOR
static final int VARIABLE_TABLE_DEFAULT_CAPACITY = 8
static final VariableTableEntry[] VARIABLE_TABLE_EMPTY_TABLE = new VariableTableEntry[0]
static final float VARIABLE_TABLE_LOAD_FACTOR = 0.75f
static final int VARIABLE_TABLE_MAXIMUM_CAPACITY = 1 << 30

Static Package Functions

 [static initializer]
static RubyString inspect (ThreadContext context, IRubyObject object)

Private Member Functions

IRubyObject addAsBignum (ThreadContext context, RubyFixnum other)
IRubyObject addFixnum (ThreadContext context, RubyFixnum other)
IRubyObject addOther (ThreadContext context, IRubyObject other)
IRubyObject compareFixnum (ThreadContext context, RubyFixnum other)
IRubyObject lshift (long width)
IRubyObject rshift (long width)
 RubyFixnum (Ruby runtime, RubyClass klazz, long value)
IRubyObject subtractAsBignum (ThreadContext context, RubyFixnum other)
IRubyObject subtractFixnum (ThreadContext context, RubyFixnum other)
IRubyObject subtractOther (ThreadContext context, IRubyObject other)

Static Private Member Functions

static boolean additionOverflowed (long original, long other, long result)
static Object coerceToJavaType (Ruby ruby, RubyFixnum self, Class javaClass)
static IRubyObject fixCoerce (IRubyObject x)
static boolean isInCacheRange (long value)
static boolean subtractionOverflowed (long original, long other, long result)

Private Attributes

final long value

Static Private Attributes

static final int BIT_SIZE = 64
static final int CACHE_OFFSET = 128
static final Map< Class,
TypeCoercer
JAVA_COERCERS = new HashMap<Class, TypeCoercer>()

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index