java-interp.h (_Jv_InterpClass): Declare friend function _Jv_GetInterpClassSourceFile.
* include/java-interp.h (_Jv_InterpClass): Declare
friend function _Jv_GetInterpClassSourceFile.
* java/lang/Class.h (Class): Likewise.
* java/lang/natClass.cc (_Jv_GetInterpClassSourceFile):
New function.
* gnu/classpath/jdwp/natVMVirtualMachine.cc
(getSourceFile): Implement.
From-SVN: r122882
This commit is contained in:
@@ -267,6 +267,7 @@ _Jv_Utf8Const *_Jv_GetClassNameUtf8 (jclass);
|
||||
// Finds a desired interpreter method in the given class or NULL if not found
|
||||
class _Jv_MethodBase;
|
||||
_Jv_MethodBase *_Jv_FindInterpreterMethod (jclass, jmethodID);
|
||||
jstring _Jv_GetInterpClassSourceFile (jclass);
|
||||
#endif
|
||||
|
||||
jbyte _Jv_GetClassState (jclass);
|
||||
@@ -568,6 +569,7 @@ private:
|
||||
#ifdef INTERPRETER
|
||||
friend _Jv_MethodBase *(::_Jv_FindInterpreterMethod) (jclass klass,
|
||||
jmethodID desired_method);
|
||||
friend jstring ::_Jv_GetInterpClassSourceFile (jclass);
|
||||
#endif
|
||||
friend jbyte (::_Jv_GetClassState) (jclass klass);
|
||||
|
||||
|
||||
@@ -2064,3 +2064,15 @@ _Jv_GetClassState (jclass klass)
|
||||
return klass->state;
|
||||
}
|
||||
|
||||
jstring
|
||||
_Jv_GetInterpClassSourceFile (jclass klass)
|
||||
{
|
||||
if (_Jv_IsInterpretedClass (klass))
|
||||
{
|
||||
_Jv_InterpClass *iclass =
|
||||
reinterpret_cast<_Jv_InterpClass *> (klass->aux_info);
|
||||
return iclass->source_file_name;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user