Package org.jruby.javasupport
Class JavaPackage
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyModule
org.jruby.javasupport.JavaPackage
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,InstanceVariables,InternalVariables,IRubyObject,CoreObjectType
A "thin" Java package wrapper (for the runtime to see them as Ruby objects).
- Since:
- 9K
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classThis special module wrapper is used by the Java "package modules" in order to simulate a blank slate.private static classNested classes/interfaces inherited from class org.jruby.RubyModule
RubyModule.Autoload, RubyModule.AutoloadMethod, RubyModule.CacheEntryFactory, RubyModule.ConstantEntry, RubyModule.JavaClassKindOf, RubyModule.KindOf, RubyModule.MethodClumper, RubyModule.ModuleKernelMethods, RubyModule.ProfilingCacheEntryFactory, RubyModule.RespondToMissingMethod, RubyModule.SynchronizedCacheEntryFactory, RubyModule.WrapperCacheEntryFactoryNested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsFields inherited from class org.jruby.RubyModule
baseName, cachedMethods, CACHEPROXY_F, classIndex, generation, generationObject, id, INCLUDED_INTO_REFINEMENT, includingHierarchies, index, IS_OVERLAID_F, kindOf, methodInvalidator, methodLocation, methods, MODULE_ALLOCATOR, NEEDSIMPL_F, NormalCacheEntryFactory, OMOD_SHARED, parent, REFINED_MODULE_F, SCOPE_CAPTURING_METHODS, superClassFields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_F, STAMP_OFFSET, TAINTED_F, UNDEF, UNTRUST_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailable_p(ThreadContext context) (package private) static CharSequencebuildPackageName(RubyModule parentPackage, String name) private RubyBooleancheckMetaClassBoundMethod(ThreadContext context, String name, boolean includePrivate) final IRubyObjectconst_get(ThreadContext context, IRubyObject name) final IRubyObjectconst_get(ThreadContext context, IRubyObject name, IRubyObject inherit) const_missing(ThreadContext context, IRubyObject name) (package private) static RubyClasscreateJavaPackageClass(Ruby runtime, RubyModule Java) final IRubyObjectdeleteConstant(String name) final IRubyObjectfetchConstant(String name, boolean includePrivate) final booleanhasConstant(String name) inspect()rb_obj_inspect call-seq: obj.inspect => string Returns a string containing a human-readable representation of obj.final booleanmethod_missing(ThreadContext context, IRubyObject name) method_missing(ThreadContext context, IRubyObject[] args) (package private) static RubyModulenewPackage(Ruby runtime, CharSequence name, RubyModule parent) op_eqq(ThreadContext context, IRubyObject obj) rb_mod_eqq(package private) static RaiseExceptionpackageMethodArgumentMismatch(Ruby runtime, RubyModule pkg, String method, int argsLength) (package private) final CharSequenceprivate RubyModulerelativeJavaClassOrPackage(ThreadContext context, IRubyObject name, boolean cacheMethod) (package private) RubyModulerelativeJavaProxyClass(Ruby runtime, IRubyObject name) private IRubyObjectrespond_to(ThreadContext context, IRubyObject mname, boolean includePrivate) private RubyBooleanrespond_to_missing(ThreadContext context, IRubyObject mname, boolean includePrivate) respond_to_missing_p(ThreadContext context, IRubyObject name) respond_to_missing_p(ThreadContext context, IRubyObject name, IRubyObject includePrivate) respond_to_p(ThreadContext context, IRubyObject name) respond_to_p(ThreadContext context, IRubyObject name, IRubyObject includePrivate) sealed_p(ThreadContext context) final IRubyObjectstoreConstant(String name, IRubyObject value) to_s()rb_mod_to_s<T> TConvert the object to the specified Java class, if possible.Methods inherited from class org.jruby.RubyModule
addClassProvider, addIncludingHierarchy, addMethod, addMethodAtBootTimeOnly, addMethodInternal, addMethodSymbols, addModuleFunction, addReadAttribute, addReadWriteAttribute, addToCache, addToCache, addWriteAttribute, alias_method, ancestors, ancestors, append_features, attr, attr_accessor, attr_accessor, attr_reader, attr_reader, attr_writer, attr19, autoload, autoload_p, autoloadingValue, becomeSynchronized, checkForCyclicPrepend, checkFrozen, checkValidBindTargetFrom, class_variable_defined_p, class_variable_get, class_variable_get19, class_variable_set, class_variable_set19, class_variables, class_variables, class_variables19, cloneMethods, const_defined_p, const_defined_p, const_defined_p19, const_get, const_get, const_get_1_9, const_get_2_0, const_missing, const_set, constantEntryFetch, constants, constants, constants19, constants19, constantsCommon, constantsCommon, constantsCommon19, constantTableContains, constantTableFetch, constantTableRemove, constantTableStore, constantTableStore, constantTableStore, constDefined, constDefinedAt, constDefinedFrom, createModuleClass, define_method, define_method, define_method, defineAlias, defineAliases, defineAnnotatedConstant, defineAnnotatedConstants, defineAnnotatedMethod, defineAnnotatedMethod, defineAnnotatedMethod, defineAnnotatedMethod, defineAnnotatedMethods, defineAnnotatedMethodsIndividually, defineAutoload, defineClassUnder, defineConstant, defineMethodFromBlock, defineMethodFromCallable, defineModuleUnder, defineOrGetClassUnder, defineOrGetClassUnder, defineOrGetModuleUnder, deleteClassVariable, deprecate_constant, deprecate_constant, deprecateConstant, discoverInstanceVariables, ensureClassVariablesSettable, ensureConstantsSettable, equals, exportMethod, extend_object, extended, fastFetchClassVariable, fastFetchConstant, fastGetClass, fastGetClassVar, fastGetConstant, fastGetConstant, fastGetConstantAt, fastGetConstantFrom, fastGetConstantFromConstMissing, fastGetConstantFromNoConstMissing, fastHasClassVariable, fastHasConstant, fastIsClassVarDefined, fastIsConstantDefined, fastIsConstantDefined19, fastIsConstantDefined19, fastSetClassVar, fastSetConstant, fastStoreClassVariable, fastStoreConstant, fetchClassVariable, fetchConstant, findImplementer, finishAutoload, freeze, getAncestorList, getAutoloadConstant, getAutoloadConstant, getAutoloadFile, getAutoloadMap, getAutoloadMapForWrite, getBaseName, getCacheProxy, getCacheToken, getClass, getClassIndex, getClassVar, getClassVar, getClassVariableNameList, getClassVariables, getClassVariablesForRead, getClassVarQuiet, getConstant, getConstant, getConstant, getConstantAt, getConstantAt, getConstantAtSpecial, getConstantFrom, getConstantFromConstMissing, getConstantFromNoConstMissing, getConstantFromNoConstMissing, getConstantMap, getConstantMapForWrite, getConstantNames, getConstantNames, getConstantNoConstMissing, getConstantNoConstMissing, getConstantNoConstMissing, getConstantNoConstMissingSkipAutoload, getConstantNoConstMissingSKipAutoload, getConstantWithAutoload, getDelegate, getGeneration, getGenerationObject, getIdTest, getInvalidator, getJavaProxy, getMethodLocation, getMethods, getMethodsForWrite, getModule, getName, getNativeClassIndex, getNonIncludedClass, getOrigin, getParent, getRealModule, getRefinements, getRefinementsForWrite, getSimpleName, getStoredConstantList, getStoredConstantNameList, getSuperClass, hasClassVariable, hash, hashCode, hasInternalModuleVariable, hasModuleInHierarchy, hasModuleInPrepends, hasPrepends, include, include, include_p, included, included_modules, includeModule, initialize, initialize, initialize_copy, instance_method, instance_methods, instance_methods19, instanceMethods, instanceMethods, invalidateCacheDescendants, invalidateCacheDescendantsInner, invalidateConstantCache, invalidateConstantCaches, invalidateCoreClasses, isClass, isClassVarDefined, isConstantDefined, isConstantDefined, isIncluded, isIncludedIntoRefinement, isInstance, isKindOfModule, isMethodBound, isMethodBound, isMethodBuiltin, isModule, isPrepended, isRefinement, isSame, isSameOrigin, isSingleton, isSynchronized, loadPopulatorFor, marshalTo, method_added, method_defined_p, method_defined_p, method_removed, method_undefined, mix, mix, module_eval, module_eval, module_eval, module_eval, module_eval, module_exec, module_exec, module_function, name, name, name19, needsImplementer, nesting, newActivatedRefinementsMap, newIdTest, newIncludeClass, newMethod, newMethod, newMethod, newModule, newModule, newRefinementsMap, newRefinementsMap, op_cmp, op_equal, op_ge, op_gt, op_le, op_lt, prepend, prepend_features, prepended, prependModule, prependModule, private_class_method, private_constant, private_constant, private_instance_methods, private_instance_methods19, private_method_defined, private_method_defined, protected_instance_methods, protected_instance_methods19, protected_method_defined, protected_method_defined, public_class_method, public_constant, public_constant, public_instance_method, public_instance_methods, public_instance_methods19, public_method_defined, public_method_defined, publicConstDefinedFrom, putAlias, putAlias, putMethod, rbPrivate, rbProtected, rbPublic, refine, remove_class_variable, remove_class_variable19, remove_const, remove_method, removeClassProvider, removeClassVariable, removeMethod, resolveRefinedMethod, resolveUndefConstant, respondsToMethod, respondsToMethod, retrieveMethod, rubyBaseName, rubyName, searchAncestor, searchInternalModuleVariable, searchMethod, searchMethodCommon, searchMethodEntryInner, searchMethodInner, searchMethodLateral, searchWithCache, searchWithCache, searchWithRefinements, setBaseName, setCacheProxy, setClassVar, setConstant, setConstant, setConstantQuiet, setConstantVisibility, setInternalModuleVariable, setJavaProxy, setMethodLocation, setMethodVisibility, setParent, setRefinements, setSuperClass, singleton_class_p, storeClassVariable, storeConstant, syncClassVariables, syncConstants, undef, undef_method, undefinedMethodMessage, undefineMethod, unmarshalFrom, updateGeneration, used_modules, using, usingModule, validateClassVariable, validateClassVariable, validateClassVariable, validateConstant, validateConstantMethods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, dig, dig1, dig2, eqlInternal, equalInternal, inspect, puts, specificEval, toRubyString, toStringMethods inherited from class org.jruby.RubyBasicObject
addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkStringType, checkStringType19, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dup, ensureInstanceVariablesSettable, eql, eql_p, equal_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize19, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isFalse, isFrozen, isImmediate, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method, method_missing, method_missing19, method19, methods, methods, methods19, nil_p, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_cmp, op_equal_19, op_match, op_match19, op_not, op_not_equal, op_not_match, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbClone, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method_added, singleton_method_added19, singleton_method_removed, singleton_method_removed19, singleton_method_undefined, singleton_method_undefined19, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_a, trust, type, type_deprecated, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
-
Field Details
-
packageName
-
-
Constructor Details
-
JavaPackage
-
-
Method Details
-
createJavaPackageClass
-
newPackage
-
buildPackageName
-
getPackageName
-
package_name
-
to_s
Description copied from class:RubyModulerb_mod_to_s- Overrides:
to_sin classRubyModule
-
inspect
Description copied from class:RubyBasicObjectrb_obj_inspect call-seq: obj.inspect => string Returns a string containing a human-readable representation of obj. If not overridden, uses theto_smethod 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"- Specified by:
inspectin interfaceIRubyObject- Overrides:
inspectin classRubyBasicObject- Returns:
- String
-
op_eqq
Description copied from class:RubyModulerb_mod_eqq- Specified by:
op_eqqin interfaceIRubyObject- Overrides:
op_eqqin classRubyModule
-
const_missing
-
const_get
-
const_get
-
storeConstant
- Overrides:
storeConstantin classRubyModule
-
hasConstant
- Overrides:
hasConstantin classRubyModule
-
fetchConstant
- Overrides:
fetchConstantin classRubyModule
-
deleteConstant
- Overrides:
deleteConstantin classRubyModule
-
packageRelativeName
-
relativeJavaClassOrPackage
private RubyModule relativeJavaClassOrPackage(ThreadContext context, IRubyObject name, boolean cacheMethod) -
relativeJavaProxyClass
-
respond_to_p
-
respond_to_p
public IRubyObject respond_to_p(ThreadContext context, IRubyObject name, IRubyObject includePrivate) -
respond_to
-
checkMetaClassBoundMethod
private RubyBoolean checkMetaClassBoundMethod(ThreadContext context, String name, boolean includePrivate) -
respond_to_missing_p
-
respond_to_missing_p
public IRubyObject respond_to_missing_p(ThreadContext context, IRubyObject name, IRubyObject includePrivate) -
respond_to_missing
private RubyBoolean respond_to_missing(ThreadContext context, IRubyObject mname, boolean includePrivate) -
method_missing
-
method_missing
-
packageMethodArgumentMismatch
static RaiseException packageMethodArgumentMismatch(Ruby runtime, RubyModule pkg, String method, int argsLength) -
isAvailable
public final boolean isAvailable() -
available_p
-
sealed_p
-
toJava
Description copied from interface:IRubyObjectConvert the object to the specified Java class, if possible.- Specified by:
toJavain interfaceIRubyObject- Overrides:
toJavain classRubyModule- Parameters:
target- The target type to which the object should be converted.- See Also:
-