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 valuedoubleRubyBignum.asDouble(ThreadContext context) doubleRubyFixnum.asDouble(ThreadContext context) doubleRubyFloat.asDouble(ThreadContext context) doubleRubyNumeric.asDouble(ThreadContext context) Return a double representation of this numerical valuedoubleRubyRational.asDouble(ThreadContext context) intRubyBignum.asInt(ThreadContext context) intRubyFixnum.asInt(ThreadContext context) intRubyFloat.asInt(ThreadContext context) intRubyNumeric.asInt(ThreadContext context) Returns the value of this numeric and a java int.longRubyBignum.asLong(ThreadContext context) longRubyFixnum.asLong(ThreadContext context) longRubyFloat.asLong(ThreadContext context) longRubyNumeric.asLong(ThreadContext context) Return the value of this numeric as a 64-bit long.longRubyRational.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.voidRubyModule.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.longRubyFixnum.getValue()When you know you are working directly with a Fixnum you can get the long value it represents without usingRubyNumeric.asLong(ThreadContext).doubleRubyFloat.getValue()Get the raw float value.<T extends RubyModule>
TRubyModule.include(ThreadContext context, RubyModule module) In Defining this type include a module.booleanRubyString.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) intRubyBignum.signum(ThreadContext context) intRubyFixnum.signum(ThreadContext context) intRubyFloat.signum(ThreadContext context) intRubyInteger.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) doubleRubyBigDecimal.asDouble(ThreadContext context) intRubyBigDecimal.asInt(ThreadContext context) longRubyBigDecimal.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 RubyClassIRubyObject.singletonClass(ThreadContext context)