Logo Search packages:      
Sourcecode: jruby version File versions  Download package

Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Package Functions | Static Package Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

org::jruby::javasupport::JavaClass Class Reference

Inheritance diagram for org::jruby::javasupport::JavaClass:
Inheritance graph
Collaboration diagram for org::jruby::javasupport::JavaClass:
Collaboration graph

List of all members.


class  AssignedName
class  ClassInitializer
class  ConstantField
class  ConstructorInvokerInstaller
class  FieldInstaller
interface  Initializer
class  InitializerState
class  InstanceFieldGetterInstaller
class  InstanceFieldSetterInstaller
class  InstanceMethodInvokerInstaller
class  InterfaceInitializer
class  MethodInstaller
class  NamedInstaller
class  StaticFieldGetterInstaller
class  StaticFieldSetterInstaller
class  StaticMethodInvokerInstaller

Public Member Functions

void addFinalizer (IRubyObject f)
void addProxyExtender (final IRubyObject extender)
IRubyObject afill (IRubyObject beginIndex, IRubyObject endIndex, IRubyObject someValue)
IRubyObject annotation (IRubyObject annoClass)
RubyBoolean annotation_p ()
IRubyObject annotation_present_p (IRubyObject annoClass)
IRubyObject annotations ()
RubyBoolean annotations_p ()
RubyBoolean anonymous_class_p ()
IRubyObject anyToString ()
IRubyObject aref (IRubyObject index)
JavaClass array_class ()
RubyBoolean array_p ()
IRubyObject aset (IRubyObject index, IRubyObject someValue)
String asJavaString ()
RubyBoolean assignable_from_p (IRubyObject other)
RubyString asString ()
void attachToObjectSpace ()
final void callInit (IRubyObject[] args, Block block)
final IRubyObject callMethod (ThreadContext context, String name)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject arg)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args)
final IRubyObject callMethod (String name, IRubyObject...args)
final IRubyObject callMethod (String name)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, Block block)
final IRubyObject callMethod (ThreadContext context, int methodIndex, String name)
final IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject arg)
IRubyObject callSuper (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject canonical_name ()
IRubyObject checkArrayType ()
final IRubyObject checkCallMethod (ThreadContext context, String name)
IRubyObject checkStringType ()
IRubyObject checkStringType19 ()
IRubyObject class_loader ()
RubyArray classes ()
int compareTo (IRubyObject other)
JavaClass component_type ()
IRubyObject concatArrays (ThreadContext context, JavaArray original, JavaArray additional)
IRubyObject concatArrays (ThreadContext context, JavaArray original, IRubyObject additional)
JavaConstructor constructor (IRubyObject[] args)
RubyArray constructors ()
RubyArray convertToArray ()
RubyFloat convertToFloat ()
RubyHash convertToHash ()
RubyInteger convertToInteger ()
RubyInteger convertToInteger (int methodIndex, String convertMethod)
RubyInteger convertToInteger (String convertMethod)
RubyString convertToString ()
final IRubyObject convertToType (RubyClass target, int convertMethodIndex)
void copyInstanceVariablesInto (final InstanceVariables other)
void copyInstanceVariablesInto (InstanceVariables other)
void copySpecialInstanceVariables (IRubyObject clone)
Object dataGetStruct ()
synchronized Object dataGetStructChecked ()
void dataWrapStruct (Object object)
IRubyObject declared_annotations ()
RubyBoolean declared_annotations_p ()
RubyArray declared_class_methods ()
RubyArray declared_classes ()
JavaConstructor declared_constructor (IRubyObject[] args)
RubyArray declared_constructors ()
JavaField declared_field (ThreadContext context, IRubyObject name)
RubyArray declared_fields ()
RubyArray declared_instance_methods ()
JavaMethod declared_method (IRubyObject[] args)
JavaCallable declared_method_smart (IRubyObject[] args)
IRubyObject declaring_class ()
IRubyObject display (ThreadContext context, IRubyObject[] args)
IRubyObject dup ()
IRubyObject emptyJavaArray (ThreadContext context)
IRubyObject enclosing_class ()
IRubyObject enclosing_constructor ()
IRubyObject enclosing_method ()
IRubyObject enum_constants ()
RubyBoolean enum_p ()
boolean eql (IRubyObject other)
IRubyObject eql_p (IRubyObject obj)
IRubyObject equal_p (ThreadContext context, IRubyObject obj)
IRubyObject equal_p19 (ThreadContext context, IRubyObject other)
boolean equals (Object other)
IRubyObject evalUnder (final ThreadContext context, RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line)
IRubyObject evalUnder (final ThreadContext context, RubyModule under, RubyString src, String file, int line)
IRubyObject extend (IRubyObject[] args)
IRubyObject extend_proxy (IRubyObject extender)
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)
JavaField field (ThreadContext context, IRubyObject name)
RubyArray fields ()
RubyBoolean final_p ()
IRubyObject freeze (ThreadContext context)
RubyBoolean frozen_p (ThreadContext context)
IRubyObject generic_interfaces ()
IRubyObject generic_superclass ()
IRubyObject get_package ()
final boolean getFlag (int flag)
IRubyObject getInstanceVariable (String name)
List< Variable< IRubyObject > > getInstanceVariableList ()
List< String > getInstanceVariableNameList ()
InstanceVariables getInstanceVariables ()
Object getInternalVariable (String name)
InternalVariables getInternalVariables ()
Class<?> getJavaClass ()
final RubyClass getMetaClass ()
int getNativeTypeIndex ()
RubyClass getProxyClass ()
RubyModule getProxyModule ()
final Ruby getRuntime ()
RubyClass getSingletonClass ()
RubyClass getType ()
Object getValue ()
Object getVariable (int index)
int getVariableCount ()
List< Variable< Object > > getVariableList ()
List< String > getVariableNameList ()
RubyFixnum hash ()
int hashCode ()
IRubyObject hashyInspect ()
boolean hasInstanceVariable (String name)
boolean hasInternalVariable (String name)
boolean hasVariables ()
IRubyObject id ()
IRubyObject id_deprecated ()
IRubyObject infectBy (IRubyObject obj)
IRubyObject initialize ()
IRubyObject initialize_copy (IRubyObject original)
RubyString inspect ()
IRubyObject instance_eval (ThreadContext context, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject[] args, 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)
RubyBoolean interface_p ()
RubyArray interfaces ()
IRubyObject is_java_proxy ()
boolean isBuiltin (String methodName)
boolean isClass ()
final boolean isFalse ()
boolean isFrozen ()
boolean isImmediate ()
boolean isModule ()
final boolean isNil ()
boolean isTaint ()
final boolean isTrue ()
boolean isUntrusted ()
IRubyObject java_class ()
RubyArray java_class_methods ()
RubyArray java_instance_methods ()
JavaMethod java_method (IRubyObject[] args)
RubyString java_type ()
IRubyObject javaArrayFromRubyArray (ThreadContext context, IRubyObject fromArray)
IRubyObject javaArraySubarray (ThreadContext context, JavaArray fromArray, int index, int size)
Class javaClass ()
RubyBoolean kind_of_p (ThreadContext context, IRubyObject type)
RubyFixnum length ()
RubyBoolean local_class_p ()
void lockProxy ()
RubyClass makeMetaClass (RubyClass superClass)
IRubyObject marshal_dump ()
IRubyObject marshal_load (ThreadContext context, IRubyObject str)
RubyBoolean member_class_p ()
IRubyObject method (IRubyObject symbol)
IRubyObject methods (ThreadContext context, IRubyObject[] args)
IRubyObject methods (ThreadContext context, IRubyObject[] args, boolean useSymbols)
IRubyObject methods19 (ThreadContext context, IRubyObject[] args)
IRubyObject modifiers ()
RubyString name ()
JavaObject new_array (IRubyObject lengthArgument)
IRubyObject nil_p (ThreadContext context)
IRubyObject op_cmp (IRubyObject other)
IRubyObject op_eqq (ThreadContext context, IRubyObject other)
IRubyObject op_equal (IRubyObject other)
IRubyObject op_equal (ThreadContext context, IRubyObject obj)
IRubyObject op_equal_19 (ThreadContext context, IRubyObject obj)
IRubyObject op_match (ThreadContext context, IRubyObject arg)
IRubyObject op_not (ThreadContext context)
IRubyObject op_not_equal (ThreadContext context, IRubyObject other)
IRubyObject op_not_match (ThreadContext context, IRubyObject arg)
RubyBoolean primitive_p ()
IRubyObject private_methods (ThreadContext context, IRubyObject[] args)
IRubyObject private_methods19 (ThreadContext context, IRubyObject[] args)
RubyBoolean private_p ()
IRubyObject protected_methods (ThreadContext context, IRubyObject[] args)
IRubyObject protected_methods19 (ThreadContext context, IRubyObject[] args)
RubyBoolean protected_p ()
IRubyObject protection_domain ()
IRubyObject public_methods (ThreadContext context, IRubyObject[] args)
IRubyObject public_methods19 (ThreadContext context, IRubyObject[] args)
RubyBoolean public_p ()
IRubyObject rbClone ()
IRubyObject remove_instance_variable (ThreadContext context, IRubyObject name, Block block)
void removeFinalizers ()
IRubyObject removeInstanceVariable (String name)
Object removeInternalVariable (String name)
IRubyObject resource (IRubyObject name)
IRubyObject resource_as_stream (IRubyObject name)
IRubyObject resource_as_string (IRubyObject name)
RubyBoolean respond_to_p (IRubyObject mname)
RubyBoolean respond_to_p (IRubyObject mname, IRubyObject includePrivate)
final boolean respondsTo (String name)
RubyModule ruby_class ()
IRubyObject ruby_synchronized (ThreadContext context, Block block)
IRubyObject same (IRubyObject other)
IRubyObject send (ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject send (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject send (ThreadContext context, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, Block block)
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 setTaint (boolean taint)
void setUntrusted (boolean untrusted)
void setupInterfaceModule (final RubyModule module)
void setupProxy (final RubyClass proxy)
synchronized void setVariable (int index, Object value)
IRubyObject signers ()
RubyString simple_name ()
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, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject[] args, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg, Block block)
IRubyObject superclass ()
void syncVariables (List< Variable< Object >> variables)
IRubyObject synthetic_p ()
IRubyObject taint (ThreadContext context)
RubyBoolean tainted_p (ThreadContext context)
RubyArray to_a ()
IRubyObject to_s ()
Object toJava (Class cls)
String toString ()
IRubyObject trust (ThreadContext context)
RubyClass type ()
RubyClass type_deprecated ()
IRubyObject type_parameters ()
void unlockProxy ()
IRubyObject untaint (ThreadContext context)
IRubyObject untrust (ThreadContext context)
RubyBoolean untrusted_p (ThreadContext context)

Static Public Member Functions

static boolean assignable (Class<?> thisClass, Class<?> otherClass)
static RubyClass createBasicObjectClass (Ruby runtime, RubyClass objectClass)
static RubyClass createJavaClassClass (Ruby runtime, RubyModule javaModule)
static RubyClass createJavaObjectClass (Ruby runtime, RubyModule javaModule)
static RubyClass createObjectClass (Ruby runtime, RubyClass objectClass)
static JavaClass for_name (IRubyObject recv, IRubyObject name)
static synchronized JavaClass forNameQuiet (Ruby runtime, String className)
static synchronized JavaClass forNameVerbose (Ruby runtime, String className)
static JavaClass get (Ruby runtime, Class<?> klass)
static Field[] getDeclaredFields (Class<?> javaClass)
static Field[] getFields (Class<?> javaClass)
static JavaCallable getMatchingCallable (Ruby runtime, Class<?> javaClass, String methodName, Class<?>[] argumentTypes)
static RubyArray getRubyArray (Ruby runtime, Class<?>[] classes)
static IRubyObject op_equal (JavaProxy self, IRubyObject other)
static void puts (Object obj)
static IRubyObject ruby_synchronized (ThreadContext context, Object lock, Block block)
static IRubyObject to_s (Ruby runtime, Object dataStruct)
static RaiseException undefinedFieldError (Ruby runtime, String javaClassName, String name)
static JavaObject wrap (Ruby runtime, Object value)
static IRubyObject wrap (ThreadContext context, IRubyObject self, IRubyObject object)

Static Public Attributes

static final int ALL_F = -1
static final boolean CAN_SET_ACCESSIBLE
static final int COMPARE_BY_IDENTITY_F = (1<<(FL_USHIFT+8))
static final int FALSE_F = 1 << 0
static final int FL_USHIFT = 5
static final int FROZEN_F = 1 << 2
static final String METHOD_MANGLE = "__method"
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))

Protected Member Functions

void checkFrozen ()
final void ensureInstanceVariablesSettable ()
Map< String, AssignedNamegetInstanceAssignedNames ()
synchronized long getObjectId ()
RubyClass getSingletonClassClone ()
Map< String, AssignedNamegetStaticAssignedNames ()
synchronized long initObjectId (RubyClass.VariableAccessor objectIdAccessor)
int inspectHashCode ()
void taint (Ruby runtime)
final void testFrozen (String message)
final void testFrozen ()
String validateInstanceVariable (String name)
boolean variableTableContains (String name)
boolean variableTableFastContains (String internedName)
Object variableTableFastFetch (String internedName)
Object variableTableFastStore (String internedName, Object value)
Object variableTableFetch (String name)
Object variableTableRemove (String name)
Object variableTableStore (String name, Object value)
void variableTableSync (List< Variable< Object >> 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 void registerRubyMethods (Ruby runtime, RubyClass result)

Protected Attributes

int flags
transient RubyClass metaClass

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 (RubyBasicObject obj)
final RubyBasicObject infectBy (int tuFlags)

Static Package Functions

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

Private Types

enum  Priority {
  RESERVED = (0), METHOD = (1), FIELD = (2), PROTECTED_METHOD = (3),

Private Member Functions

void addField (Map< String, NamedInstaller > callbacks, Map< String, AssignedName > names, Field field, boolean isFinal, boolean isStatic)
void applyProxyExtenders ()
Class<?>[] buildArgumentTypes (IRubyObject[] args) throws ClassNotFoundException
Class<?>[] buildClassArgs (IRubyObject[] args)
RubyArray buildConstructors (Constructor<?>[] constructors)
RubyArray buildFieldResults (Field[] fields)
void extendProxy (IRubyObject extender)
void installClassClasses (final Class<?> javaClass, final RubyModule proxy)
synchronized void installClassConstructors (final RubyClass proxy)
synchronized void installClassFields (final RubyClass proxy)
synchronized void installClassMethods (final RubyClass proxy)
void installInstanceMethods (Map< String, NamedInstaller > methodCallbacks, Class<?> javaClass, Method method, String name)
void installStaticMethods (Map< String, NamedInstaller > methodCallbacks, Class<?> javaClass, Method method, String name)
boolean isPrimitive ()
RubyArray java_methods (Method[] methods, boolean isStatic)
 JavaClass (Ruby runtime, Class<?> javaClass)
void setupClassConstructors (Class<?> javaClass)
void setupClassFields (Class<?> javaClass, InitializerState state)
void setupClassMethods (Class<?> javaClass, InitializerState state)
void setupInterfaceProxy (final RubyClass proxy)

Static Private Member Functions

static void addNewMethods (HashMap< String, List< Method >> nameMethods, Method[] methods, boolean includeStatic, boolean removeDuplicate)
static void addUnassignedAlias (String name, Map< String, AssignedName > assignedNames, MethodInstaller installer)
static void assignAliases (MethodInstaller installer, Map< String, AssignedName > assignedNames)
static synchronized JavaClass createJavaClass (Ruby runtime, Class<?> klass)
static Class<?>[] getClasses (Class<?> javaClass)
static Constructor[] getConstructors (Class<?> javaClass)
static Class<?>[] getDeclaredClasses (Class<?> javaClass)
static Method[] getMethods (Class<?> javaClass)
static String getSimpleName (Class<?> clazz)
static boolean methodsAreEquivalent (Method child, Method parent)

Private Attributes

List< ConstantFieldconstantFields
ConstructorInvokerInstaller constructorInstaller
volatile RubyArray constructors
final Initializer initializer
Map< String, AssignedNameinstanceAssignedNames
Map< String, NamedInstallerinstanceInstallers
final RubyModule JAVA_UTILITIES = getRuntime().getJavaSupport().getJavaUtilitiesModule()
volatile RubyClass proxyClass
volatile ArrayList< IRubyObjectproxyExtenders
final ReentrantLock proxyLock = new ReentrantLock()
volatile RubyModule proxyModule
Map< String, AssignedNamestaticAssignedNames
Map< String, NamedInstallerstaticInstallers
RubyClass unfinishedProxyClass
RubyModule unfinishedProxyModule

Static Private Attributes

static final Callback __jsend_method
static final Initializer DUMMY_INITIALIZER
static final Map< String,
static final Object NEVER = new Object()
static Map< String, Class > PRIMITIVE_TO_CLASS = new HashMap<String,Class>()
static final Map< String,
RESERVED_NAMES = new HashMap<String, AssignedName>()
static final Map< String,

Detailed Description

Definition at line 97 of file JavaClass.java.

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

Generated by  Doxygen 1.6.0   Back to index