Uses of Annotation Interface
org.jruby.api.JRubyAPI
Packages that use JRubyAPI
-
Uses of JRubyAPI in org.jruby
Modifier and TypeMethodDescription<T extends RubyClass>
TRubyClass.allocator
(ObjectAllocator allocator) Define an allocator for this class (usually this is part ofDefine.defineClass(ThreadContext, String, RubyClass, ObjectAllocator)
).RubyBignum.asBigInteger
(ThreadContext context) RubyFixnum.asBigInteger
(ThreadContext context) RubyFloat.asBigInteger
(ThreadContext context) RubyNumeric.asBigInteger
(ThreadContext context) Return a BigInteger representation of this numerical valuedouble
RubyBignum.asDouble
(ThreadContext context) double
RubyFixnum.asDouble
(ThreadContext context) double
RubyFloat.asDouble
(ThreadContext context) double
RubyNumeric.asDouble
(ThreadContext context) Return a double representation of this numerical valuedouble
RubyRational.asDouble
(ThreadContext context) int
RubyBignum.asInt
(ThreadContext context) int
RubyFixnum.asInt
(ThreadContext context) int
RubyFloat.asInt
(ThreadContext context) int
RubyNumeric.asInt
(ThreadContext context) Returns the value of this numeric and a java int.long
RubyBignum.asLong
(ThreadContext context) long
RubyFixnum.asLong
(ThreadContext context) long
RubyFloat.asLong
(ThreadContext context) long
RubyNumeric.asLong
(ThreadContext context) Return the value of this numeric as a 64-bit long.long
RubyRational.asLong
(ThreadContext context) <T extends RubyModule>
TSet the base name of the class.RubyRange.begin
(ThreadContext context) <T extends RubyModule>
TRubyModule.classIndex
(ClassIndex classIndex) Sets the ClassIndex for this type<T extends RubyClass>
TRubyModule.defineClassUnder
(ThreadContext context, String name, RubyClass superClass, ObjectAllocator allocator) Define a Class under this Class/Module.<T extends RubyModule>
TRubyModule.defineConstant
(ThreadContext context, String name, IRubyObject value) Define a constant when you are defining your Ruby class/module.<T extends RubyModule>
TRubyModule.defineConstant
(ThreadContext context, String name, IRubyObject value, boolean hidden) Define a constant when you are defining your Ruby class/module.<T extends RubyModule>
TRubyModule.defineConstants
(ThreadContext context, Class constantSource) Define constant for your module/class with the supplied Class which contains @JRubyMethod annotations.<C extends Enum<C> & jnr.constants.Constant,
T extends RubyModule>
TRubyModule.defineConstantsFrom
(ThreadContext context, Class<C> enumClass) Define all constants from the given jnr-constants enum which are defined on the current platform.<T extends RubyModule>
TRubyModule.defineMethods
(ThreadContext context, Class... methodSources) Define methods for your module/class with the supplied Class which contains @JRubyMethod annotations.RubyModule.defineModuleUnder
(ThreadContext context, String name) Define a module under this module.void
RubyModule.deprecateConstant
(ThreadContext context, String name) Mark the named constant as deprecated.RubyRange.end
(ThreadContext context) RubyArray.first
(ThreadContext context) RubyArray.first
(ThreadContext context, IRubyObject arg0) RubyString.freeze
(ThreadContext context) RubyString.getByteList()
Get the ByteList which backs this Ruby StringRubyModule.getClass
(ThreadContext context, String name) Finds a class that is within the current module/class.long
RubyFixnum.getValue()
When you know you are working directly with a Fixnum you can get the long value it represents without usingRubyNumeric.asLong(ThreadContext)
.double
RubyFloat.getValue()
Get the raw float value.<T extends RubyModule>
TRubyModule.include
(ThreadContext context, RubyModule module) In Defining this type include a module.boolean
RubyString.isEmpty()
<T extends RubyModule>
TRubyModule.kindOf
(RubyModule.KindOf kindOf) Set the method for determining whether an Object is a kind of the supplied type.RubyArray.last
(ThreadContext context) <T extends RubyClass>
TRubyClass.marshalWith
(ObjectMarshal marshal) Set what marshaller we use or generally use this to specify the typw cannot Marshal data.<T extends RubyClass>
TRubyClass.reifiedClass
(Class<? extends IRubyObject> reifiedClass) Sets reified class to use.RubyArray.reverse
(ThreadContext context) int
RubyBignum.signum
(ThreadContext context) int
RubyFixnum.signum
(ThreadContext context) int
RubyFloat.signum
(ThreadContext context) int
RubyInteger.signum
(ThreadContext context) RubyBasicObject.singletonClass
(ThreadContext context) Will either return the existing singleton class for this object, or create a new one and return that.RubyString.split
(ThreadContext context, RubyRegexp delimiter, int limit) Split for ext (Java) callers (does not write $~).RubyString.split
(ThreadContext context, RubyString delimiter, int limit) Split for ext (Java) callers (does not write $~).RubyArray.store
(ThreadContext context, long index, IRubyObject value) Store an element at the specified index or throw if the index is invalid.RubyModule.superClass()
Get this module/class super class.<T extends RubyModule>
TRubyModule.superClass
(RubyClass superClass) Set this module/class super class.<T extends RubyModule>
TProvide itself to a lambda then return itself.<T extends RubyModule>
TRubyModule.undefMethods
(ThreadContext context, String... names) Undefine a method from this type. -
Uses of JRubyAPI in org.jruby.ext.bigdecimal
Methods in org.jruby.ext.bigdecimal with annotations of type JRubyAPIModifier and TypeMethodDescriptionRubyBigDecimal.asBigInteger
(ThreadContext context) double
RubyBigDecimal.asDouble
(ThreadContext context) int
RubyBigDecimal.asInt
(ThreadContext context) long
RubyBigDecimal.asLong
(ThreadContext context) -
Uses of JRubyAPI in org.jruby.runtime.builtin
Methods in org.jruby.runtime.builtin with annotations of type JRubyAPIModifier and TypeMethodDescriptionIRubyObject.getMetaClass()
Retrieveself.class
.default RubyClass
IRubyObject.singletonClass
(ThreadContext context)