Top Inners Fields Constructors Methods
org.jruby.ext.pathname

public Class RubyPathname

extends RubyObject
Class Inheritance
Annotations
@JRubyClass
name:Pathname
Static Imports
org.jruby.anno.FrameField.BACKREF, org.jruby.api.Access.*, .Convert.asFixnum, .Convert.asSymbol, org.jruby.api.Create.*, .Error.argumentError

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface
public static class
pack-priv static interface

Field Summary

Modifier and TypeField and Description
private static final RubyPathname.AddArg
private static final RubyPathname.ReturnValueMapper
private static final RubyPathname.ReturnValueMapper
private static final RubyPathname.ReturnValueMapper
private static final RubyPathname.AddArg
Inherited from org.jruby.RubyObject:
IVAR_INSPECTING_OBJECT_ALLOCATOROBJECT_ALLOCATORREIFYING_OBJECT_ALLOCATOR

Constructor Summary

AccessConstructor and Description
public
RubyPathname(Ruby runtime, RubyClass metaClass)

Method Summary

Modifier and TypeMethod and Description
private int
pack-priv static void
private static void
defineDelegateMethods(ThreadContext context, RubyClass cPathname, final RubyModule klass, String... methods)

private static void
defineDelegateMethodsAppendPath(ThreadContext context, RubyClass cPathname, final RubyModule klass, String... methods)

private static void
defineDelegateMethodsArrayOfPaths(ThreadContext context, RubyClass cPathname, final RubyModule klass, String... methods)

private static void
defineDelegateMethodsGeneric(ThreadContext context, RubyClass cPathname, final RubyModule klass, final RubyPathname.ReturnValueMapper mapper, final RubyPathname.AddArg addArg, String... methods)

private static void
defineDelegateMethodsSinglePath(ThreadContext context, RubyClass cPathname, final RubyModule klass, String... methods)

public IRubyObject
each_entry(ThreadContext context, Block block)

public IRubyObject
each_line(ThreadContext context, IRubyObject[] args, Block block)

public IRubyObject
public IRubyObject
fnmatch(ThreadContext context, IRubyObject[] args)
Deprecated

public IRubyObject
public IRubyObject
public IRubyObject
private RubyString
public static IRubyObject
public static IRubyObject
glob(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

public IRubyObject
glob(ThreadContext context, IRubyObject[] _args, Block block)

public RubyFixnum
hash(ThreadContext
the current thread context
context
)

Overrides org.jruby.RubyBasicObject.hash.

Will return the hash code of this object.

public int
hashCode()

Overrides org.jruby.RubyObject.hashCode.

This override does not do "checked" dispatch since Object usually has #hash defined.

public IRubyObject
public IRubyObject
initialize_copy(ThreadContext
the thread context
context
,
IRubyObject
the original
pathname
)

Overrides org.jruby.RubyBasicObject.initialize_copy.

Initializes this object as a copy of the original, that is the parameter to this object.

private static IRubyObject[]
insert(IRubyObject[] old, int i, IRubyObject obj)

private IRubyObject[]
insertPath(IRubyObject[] args, int i)

public IRubyObject
inspect(ThreadContext context)

Overrides org.jruby.RubyBasicObject.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Returns a string containing a human-readable representation of obj.

private static RubyArray<T extends IRubyObject>
public static RubyPathname
public static RubyPathname
public IRubyObject
public IRubyObject
op_equal(ThreadContext context, IRubyObject other)

Overrides org.jruby.RubyBasicObject.op_equal.

Implements org.jruby.runtime.builtin.IRubyObject.op_equal.

rb_obj_equal Will by default use identity equality to compare objects.

public IRubyObject
opendir(ThreadContext context, Block block)

private void
private static JavaSites.PathnameSites
sites(ThreadContext context)

Hides org.jruby.RubyObject.sites.

Retrieve the call sites for this class.

public IRubyObject
sub(ThreadContext context, IRubyObject[] args, Block block)

public IRubyObject
public IRubyObject
taint(ThreadContext context)

Overrides org.jruby.RubyBasicObject.taint.

Deprecated

public IRubyObject
public IRubyObject
private IRubyObject[]
public IRubyObject
Inherited from org.jruby.RubyObject:
attachToObjectSpacecallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitconvertToTypedigdig1dig2eqlInternalequalInternalequalsfinishObjectClassgetNativeClassIndexinspectop_eqqputsspecificEvaltoRubyStringtoString

Field Detail

APPEND_PATHback to summary
private static final RubyPathname.AddArg APPEND_PATH
ARRAY_OF_PATHS_MAPPERback to summary
private static final RubyPathname.ReturnValueMapper ARRAY_OF_PATHS_MAPPER
IDENTITY_MAPPERback to summary
private static final RubyPathname.ReturnValueMapper IDENTITY_MAPPER
SINGLE_PATH_MAPPERback to summary
private static final RubyPathname.ReturnValueMapper SINGLE_PATH_MAPPER
UNSHIFT_PATHback to summary
private static final RubyPathname.AddArg UNSHIFT_PATH

Constructor Detail

RubyPathnameback to summary
public RubyPathname(Ruby runtime, RubyClass metaClass)

Method Detail

cmpback to summary
private int cmp(RubyPathname other)
createPathnameClassback to summary
pack-priv static void createPathnameClass(ThreadContext context)
defineDelegateMethodsback to summary
private static void defineDelegateMethods(ThreadContext context, RubyClass cPathname, final RubyModule klass, String... methods)
defineDelegateMethodsAppendPathback to summary
private static void defineDelegateMethodsAppendPath(ThreadContext context, RubyClass cPathname, final RubyModule klass, String... methods)
defineDelegateMethodsArrayOfPathsback to summary
private static void defineDelegateMethodsArrayOfPaths(ThreadContext context, RubyClass cPathname, final RubyModule klass, String... methods)
defineDelegateMethodsGenericback to summary
private static void defineDelegateMethodsGeneric(ThreadContext context, RubyClass cPathname, final RubyModule klass, final RubyPathname.ReturnValueMapper mapper, final RubyPathname.AddArg addArg, String... methods)
defineDelegateMethodsSinglePathback to summary
private static void defineDelegateMethodsSinglePath(ThreadContext context, RubyClass cPathname, final RubyModule klass, String... methods)
each_entryback to summary
public IRubyObject each_entry(ThreadContext context, Block block)
Annotations
@JRubyMethod
each_lineback to summary
public IRubyObject each_line(ThreadContext context, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
optional:3
checkArity:false
keywords:true
empty_pback to summary
public IRubyObject empty_p(ThreadContext context)
Annotations
@JRubyMethod
name:empty?
fnmatchback to summary
public IRubyObject fnmatch(ThreadContext context, IRubyObject[] args)

Deprecated

Annotations
@Deprecated
fnmatch_pback to summary
public IRubyObject fnmatch_p(ThreadContext context, IRubyObject arg0)
Annotations
@JRubyMethod
name:fnmatch, fnmatch?
fnmatch_pback to summary
public IRubyObject fnmatch_p(ThreadContext context, IRubyObject arg0, IRubyObject arg1)
Annotations
@JRubyMethod
name:fnmatch, fnmatch?
freezeback to summary
public IRubyObject freeze(ThreadContext context)

Overrides org.jruby.RubyBasicObject.freeze.

Annotations
@Override
@JRubyMethod
getPathback to summary
private RubyString getPath()
getwdback to summary
public static IRubyObject getwd(ThreadContext context, IRubyObject recv)
Annotations
@JRubyMethod
alias:pwd
meta:true
globback to summary
public static IRubyObject glob(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
required:1
optional:2
checkArity:false
meta:true
globback to summary
public IRubyObject glob(ThreadContext context, IRubyObject[] _args, Block block)
Annotations
@JRubyMethod
required:1
optional:1
checkArity:false
hashback to summary
public RubyFixnum hash(ThreadContext context)

Overrides org.jruby.RubyBasicObject.hash.

Doc from org.jruby.RubyBasicObject.hash.

Will return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.

Parameters
context:ThreadContext

the current thread context

Returns:RubyFixnum

the hash value

Annotations
@JRubyMethod
name:hash
hashCodeback to summary
public int hashCode()

Overrides org.jruby.RubyObject.hashCode.

Doc from org.jruby.RubyObject.hashCode.

This override does not do "checked" dispatch since Object usually has #hash defined.

Returns:int

the hash code

Annotations
@Override
initializeback to summary
public IRubyObject initialize(ThreadContext context, IRubyObject path)
Annotations
@JRubyMethod
visibility:PRIVATE
initialize_copyback to summary
public IRubyObject initialize_copy(ThreadContext context, IRubyObject pathname)

Overrides org.jruby.RubyBasicObject.initialize_copy.

Doc from org.jruby.RubyBasicObject.initialize_copy.

Initializes this object as a copy of the original, that is the parameter to this object. Will make sure that the argument actually has the same real class as this object. It shouldn't be possible to initialize an object with something totally different.

Parameters
context:ThreadContext

the thread context

pathname:IRubyObject

the original

Returns:IRubyObject

a copy unless the same thing

Annotations
@JRubyMethod
visibility:PRIVATE
insertback to summary
private static IRubyObject[] insert(IRubyObject[] old, int i, IRubyObject obj)
insertPathback to summary
private IRubyObject[] insertPath(IRubyObject[] args, int i)
inspectback to summary
public IRubyObject inspect(ThreadContext context)

Overrides org.jruby.RubyBasicObject.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Doc from org.jruby.RubyBasicObject.inspect.

Returns a string containing a human-readable representation of obj. If not overridden, uses the to_s method to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"

Annotations
@JRubyMethod
mapToPathnamesback to summary
private static RubyArray<T extends IRubyObject> mapToPathnames(ThreadContext context, RubyClass clazz, IRubyObject ary)
newInstanceback to summary
public static RubyPathname newInstance(ThreadContext context, RubyClass klass, IRubyObject path)
newInstanceback to summary
public static RubyPathname newInstance(ThreadContext context, IRubyObject path)
op_cmpback to summary
public IRubyObject op_cmp(ThreadContext context, IRubyObject other)

Overrides org.jruby.RubyBasicObject.op_cmp.

Annotations
@Override
@JRubyMethod
name:<=>
op_equalback to summary
public IRubyObject op_equal(ThreadContext context, IRubyObject other)

Overrides org.jruby.RubyBasicObject.op_equal.

Implements org.jruby.runtime.builtin.IRubyObject.op_equal.

Doc from org.jruby.RubyBasicObject.op_equal.

rb_obj_equal Will by default use identity equality to compare objects. This follows the Ruby semantics. The name of this method doesn't follow the convention because hierarchy problems

Annotations
@Override
@JRubyMethod
name:==, eql?
opendirback to summary
public IRubyObject opendir(ThreadContext context, Block block)
Annotations
@JRubyMethod
setPathback to summary
private void setPath(RubyString path)
sitesback to summary
private static JavaSites.PathnameSites sites(ThreadContext context)

Hides org.jruby.RubyObject.sites.

Doc from org.jruby.RubyBasicObject.sites.

Retrieve the call sites for this class. It is expected that all Java-based core classes that do call site caching will have a similar method.

subback to summary
public IRubyObject sub(ThreadContext context, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
required:1
optional:1
checkArity:false
writes:BACKREF
sub_extback to summary
public IRubyObject sub_ext(ThreadContext context, IRubyObject newExt)
Annotations
@JRubyMethod
taintback to summary
public IRubyObject taint(ThreadContext context)

Overrides org.jruby.RubyBasicObject.taint.

Deprecated

Annotations
@Deprecated
@Override
@JRubyMethod
to_pathback to summary
public IRubyObject to_path(ThreadContext context)
Annotations
@JRubyMethod
to_sback to summary
public IRubyObject to_s(ThreadContext context)

Overrides org.jruby.RubyBasicObject.to_s.

Annotations
@JRubyMethod
unshiftPathback to summary
private IRubyObject[] unshiftPath(IRubyObject[] args)
untaintback to summary
public IRubyObject untaint(ThreadContext context)

Overrides org.jruby.RubyBasicObject.untaint.

Deprecated

Annotations
@Deprecated
@Override
@JRubyMethod
org.jruby.ext.pathname back to summary

pack-priv Interface RubyPathname.AddArg


Method Summary

Modifier and TypeMethod and Description
public IRubyObject[]

Method Detail

addArgback to summary
public IRubyObject[] addArg(IRubyObject[] args, RubyString path)
org.jruby.ext.pathname back to summary

public Class RubyPathname.PathnameKernelMethods

extends Object
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static IRubyObject
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PathnameKernelMethodsback to summary
public PathnameKernelMethods()

Method Detail

newPathnameback to summary
public static IRubyObject newPathname(ThreadContext context, IRubyObject recv, IRubyObject path)
Annotations
@JRubyMethod
name:Pathname
module:true
visibility:PRIVATE
org.jruby.ext.pathname back to summary

pack-priv Interface RubyPathname.ReturnValueMapper


Method Summary

Modifier and TypeMethod and Description
public IRubyObject
map(ThreadContext context, RubyClass klazz, IRubyObject value)

Method Detail

mapback to summary
public IRubyObject map(ThreadContext context, RubyClass klazz, IRubyObject value)