Logo Search packages:      
Sourcecode: jruby1.2 version File versions  Download package

org::jruby::RubyTime Class Reference

Inheritance diagram for org::jruby::RubyTime:

org::jruby::RubyObject org::jruby::RubyBasicObject org::jruby::runtime::builtin::IRubyObject org::jruby::runtime::builtin::InstanceVariables org::jruby::runtime::builtin::InternalVariables

List of all members.


Detailed Description

The Time class.

Author:
chadfowler, jpetersen

Definition at line 68 of file RubyTime.java.


Public Member Functions

void addFinalizer (IRubyObject f)
IRubyObject anyToString ()
IRubyObject as (Class javaClass)
RubyString asctime ()
String asJavaString ()
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 checkArrayType ()
IRubyObject checkStringType ()
int compareTo (IRubyObject other)
RubyArray convertToArray ()
RubyFloat convertToFloat ()
RubyHash convertToHash ()
RubyInteger convertToInteger (String convertMethod)
RubyInteger convertToInteger (int methodIndex, String convertMethod)
RubyInteger convertToInteger ()
RubyString convertToString ()
final IRubyObject convertToType (RubyClass target, int convertMethodIndex)
void copyInstanceVariablesInto (InstanceVariables other)
void copyInstanceVariablesInto (final InstanceVariables other)
void copySpecialInstanceVariables (IRubyObject clone)
synchronized Object dataGetStruct ()
synchronized void dataWrapStruct (Object obj)
IRubyObject display (ThreadContext context, IRubyObject[] args)
RubyString dump (IRubyObject[] args, Block unusedBlock)
IRubyObject dup ()
boolean eql (IRubyObject other)
IRubyObject eql_p (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)
IRubyObject extend (IRubyObject[] args)
IRubyObject fastGetInstanceVariable (String internedName)
Object fastGetInternalVariable (String internedName)
boolean fastHasInstanceVariable (String internedName)
boolean fastHasInternalVariable (String internedName)
IRubyObject fastSetInstanceVariable (String internedName, IRubyObject value)
void fastSetInternalVariable (String internedName, Object value)
IRubyObject freeze (ThreadContext context)
RubyBoolean frozen_p (ThreadContext context)
DateTime getDateTime ()
final boolean getFlag (int flag)
RubyTime getgm ()
IRubyObject getInstanceVariable (String name)
List< Variable< IRubyObject > > getInstanceVariableList ()
List< String > getInstanceVariableNameList ()
InstanceVariables getInstanceVariables ()
IRubyObject getInternalVariable (String name)
List< Variable< Object > > getInternalVariableList ()
InternalVariables getInternalVariables ()
Class<?> getJavaClass ()
Date getJavaDate ()
RubyTime getlocal ()
final RubyClass getMetaClass ()
int getNativeTypeIndex ()
final Ruby getRuntime ()
RubyClass getSingletonClass ()
RubyClass getType ()
long getUSec ()
int getVariableCount ()
List< Variable< IRubyObject > > getVariableList ()
Map getVariableMap ()
List< String > getVariableNameList ()
InstanceVariableTable getVariables ()
RubyBoolean gmt ()
RubyInteger gmt_offset ()
RubyTime gmtime ()
RubyFixnum hash ()
int hashCode ()
boolean hasInstanceVariable (String name)
boolean hasInternalVariable (String name)
boolean hasVariables ()
RubyInteger hour ()
synchronized IRubyObject id ()
synchronized IRubyObject id_deprecated ()
IRubyObject infectBy (IRubyObject obj)
IRubyObject initialize ()
IRubyObject initialize (Block block)
IRubyObject initialize_copy (IRubyObject original)
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)
boolean isClass ()
RubyBoolean isdst ()
final boolean isFalse ()
boolean isFrozen ()
boolean isImmediate ()
boolean isModule ()
final boolean isNil ()
boolean isTaint ()
final boolean isTrue ()
boolean isUntrusted ()
RubyBoolean kind_of_p (ThreadContext context, IRubyObject type)
RubyTime localtime ()
RubyClass makeMetaClass (RubyClass superClass)
RubyInteger mday ()
RubyObject mdump (final IRubyObject[] args)
IRubyObject method (IRubyObject symbol)
IRubyObject methods (ThreadContext context, IRubyObject[] args)
long microseconds ()
RubyInteger min ()
RubyInteger month ()
IRubyObject nil_p (ThreadContext context)
IRubyObject op_cmp (ThreadContext context, IRubyObject other)
IRubyObject op_eqq (ThreadContext context, IRubyObject other)
IRubyObject op_equal (ThreadContext context, IRubyObject obj)
IRubyObject op_ge (ThreadContext context, IRubyObject other)
IRubyObject op_gt (ThreadContext context, IRubyObject other)
IRubyObject op_le (ThreadContext context, IRubyObject other)
IRubyObject op_lt (ThreadContext context, IRubyObject other)
IRubyObject op_match (ThreadContext context, IRubyObject arg)
IRubyObject op_minus (IRubyObject other)
IRubyObject op_not (ThreadContext context)
IRubyObject op_not_equal (ThreadContext context, IRubyObject other)
IRubyObject op_plus (IRubyObject other)
IRubyObject private_methods (ThreadContext context, IRubyObject[] args)
IRubyObject protected_methods (ThreadContext context, IRubyObject[] args)
IRubyObject public_methods (ThreadContext context, IRubyObject[] args)
IRubyObject rbClone ()
IRubyObject remove_instance_variable (ThreadContext context, IRubyObject name, Block block)
void removeFinalizers ()
IRubyObject removeInstanceVariable (String name)
Object removeInternalVariable (String name)
RubyBoolean respond_to_p (IRubyObject mname, IRubyObject includePrivate)
RubyBoolean respond_to_p (IRubyObject mname)
final boolean respondsTo (String name)
 RubyTime (Ruby runtime, RubyClass rubyClass, DateTime dt)
 RubyTime (Ruby runtime, RubyClass rubyClass)
RubyInteger sec ()
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)
void setDateTime (DateTime dt)
final void setFlag (int flag, boolean set)
void setFrozen (boolean frozen)
IRubyObject setInstanceVariable (String name, IRubyObject value)
void setInternalVariable (String name, Object value)
void setMetaClass (RubyClass metaClass)
void setMicroseconds (long mic)
void setTaint (boolean taint)
void setUntrusted (boolean untrusted)
void setUSec (long usec)
RubyArray singleton_methods (ThreadContext context, IRubyObject[] args)
RubyArray singleton_methods19 (ThreadContext context, IRubyObject[] args)
RubyArray singletonMethods (ThreadContext context, IRubyObject[] args, boolean asSymbols)
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)
RubyString strftime (IRubyObject format)
RubyTime succ ()
void syncVariables (List< Variable< IRubyObject >> variables)
IRubyObject taint (ThreadContext context)
RubyBoolean tainted_p (ThreadContext context)
RubyArray to_a ()
RubyFloat to_f ()
RubyInteger to_i ()
IRubyObject to_java ()
IRubyObject to_s ()
String toString ()
IRubyObject trust (ThreadContext context)
RubyClass type ()
RubyClass type_deprecated ()
IRubyObject untaint (ThreadContext context)
IRubyObject untrust (ThreadContext context)
RubyBoolean untrusted_p (ThreadContext context)
void updateCal (DateTime dt)
RubyInteger usec ()
RubyInteger wday ()
RubyInteger yday ()
RubyInteger year ()
RubyString zone ()

Static Public Member Functions

static IRubyObject at (ThreadContext context, IRubyObject recv, IRubyObject arg1, IRubyObject arg2)
static IRubyObject at (ThreadContext context, IRubyObject recv, IRubyObject arg)
static RubyClass createBasicObjectClass (Ruby runtime, RubyClass objectClass)
static RubyClass createObjectClass (Ruby runtime, RubyClass objectClass)
static RubyClass createTimeClass (Ruby runtime)
static DateTimeZone getLocalTimeZone (Ruby runtime)
static DateTimeZone getTimeZone (Ruby runtime, String zone)
static RubyTime load (IRubyObject recv, IRubyObject from, Block block)
static RubyTime new_local (IRubyObject recv, IRubyObject[] args)
static RubyTime new_utc (IRubyObject recv, IRubyObject[] args)
static IRubyObject newInstance (ThreadContext context, IRubyObject recv)
static IRubyObject newInstance (ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
static RubyTime newTime (Ruby runtime, DateTime dt, long usec)
static RubyTime newTime (Ruby runtime, DateTime dt)
static RubyTime newTime (Ruby runtime, long milliseconds)
static void puts (Object obj)
static IRubyObject s_new (IRubyObject recv, IRubyObject[] args, Block block)

Static Public Attributes

static final int ALL_F = -1
static final int FALSE_F = 1 << 0
static final int FL_USHIFT = 5
static final int FROZEN_F = 1 << 2
static final IRubyObject NEVER = new RubyBasicObject()
static final int NIL_F = 1 << 1
static final IRubyObject[] NULL_ARRAY = new IRubyObject[0]
static final ObjectAllocator OBJECT_ALLOCATOR
static final int TAINTED_F = 1 << 3
static final IRubyObject UNDEF = new RubyBasicObject()
static final int UNTRUSTED_F = 1 << 4
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))
static final String UTC = "UTC"

Protected Member Functions

void checkFrozen ()
final void ensureInstanceVariablesSettable ()
RubyClass getSingletonClassClone ()
long getTimeInMillis ()
void taint (Ruby runtime)
final void testFrozen ()
final void testFrozen (String message)
String validateInstanceVariable (String name)
boolean variableTableContains (String name)
boolean variableTableFastContains (String internedName)
Object variableTableFastFetch (String internedName)
Object variableTableFastStore (String internedName, Object value)
IRubyObject variableTableFetch (String name)
Map variableTableGetMap (Map map)
Map variableTableGetMap ()
int variableTableGetSize ()
Object variableTableRemove (String name)
Object variableTableStore (String name, Object 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)
static RubyTime s_mload (IRubyObject recv, RubyTime time, IRubyObject from)

Protected Attributes

int flags
transient RubyClass metaClass
transient volatile
InstanceVariableTable 
variables

Static Protected Attributes

static final String ERR_INSECURE_SET_INST_VAR = "Insecure: can't modify instance variable"

Package Functions

IRubyObject checkIntegerType (Ruby runtime, IRubyObject obj, String method)
final RubyBasicObject infectBy (int tuFlags)
final RubyBasicObject infectBy (RubyBasicObject obj)

Static Package Functions

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

Private Member Functions

int cmp (RubyTime other)
IRubyObject opMinus (RubyTime other)

Static Private Member Functions

static RubyTime createTime (IRubyObject recv, IRubyObject[] args, boolean gmt)

Private Attributes

DateTime dt
long usec

Static Private Attributes

static final int ARG_SIZE = 7
static final String[] MONTHS
static final Map< String, Integer > MONTHS_MAP = new HashMap<String, Integer>()
static final DateTimeFormatter ONE_DAY_CTIME_FORMATTER = DateTimeFormat.forPattern("EEE MMM d HH:mm:ss yyyy").withLocale(Locale.ENGLISH)
static ObjectAllocator TIME_ALLOCATOR
static final int[] time_max = {31, 23, 59, 60, Integer.MAX_VALUE}
static final int[] time_min = {1, 0, 0, 0, Integer.MIN_VALUE}
static final DateTimeFormatter TO_S_FORMATTER = DateTimeFormat.forPattern("EEE MMM dd HH:mm:ss Z yyyy").withLocale(Locale.ENGLISH)
static final DateTimeFormatter TO_S_UTC_FORMATTER = DateTimeFormat.forPattern("EEE MMM dd HH:mm:ss 'UTC' yyyy").withLocale(Locale.ENGLISH)
static final DateTimeFormatter TWO_DAY_CTIME_FORMATTER = DateTimeFormat.forPattern("EEE MMM dd HH:mm:ss yyyy").withLocale(Locale.ENGLISH)
static final Pattern TZ_PATTERN = Pattern.compile("(\\D+?)([\\+-]?)(\\d+)(:\\d+)?(:\\d+)?")
static final ByteList TZ_STRING = ByteList.create("TZ")

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

Generated by  Doxygen 1.6.0   Back to index