JavaVMData.st
branchopenjdk7-support
changeset 2042 b6302ebec0b4
parent 2037 6b93bf17087a
child 2057 4c8ec3832206
equal deleted inserted replaced
2041:eb765dbc5b59 2042:b6302ebec0b4
    30 		SimulatedNativeMemory KnownWindows PermittedHostConnects
    30 		SimulatedNativeMemory KnownWindows PermittedHostConnects
    31 		FullExceptionTrace SimulatedNativeLibs StartupTime FileOpenTrace
    31 		FullExceptionTrace SimulatedNativeLibs StartupTime FileOpenTrace
    32 		ImageStretchCache LoadedNativeLibs JavaConsoleStream
    32 		ImageStretchCache LoadedNativeLibs JavaConsoleStream
    33 		JavaEventQueueThread PermittedDirectories
    33 		JavaEventQueueThread PermittedDirectories
    34 		StdinReplacementFileQuerySignal JavaScreenUpdaterThread
    34 		StdinReplacementFileQuerySignal JavaScreenUpdaterThread
    35 		ZipInflaters LoadedLibs EnteredMonitorsPerProcess
    35 		ZipInflaters LoadedLibs EnteredMonitorsPerProcess'
    36 		java_lang_String java_lang_String_valueID
       
    37 		java_lang_String_offsetID java_lang_String_countID
       
    38 		java_lang_String_hashID java_lang_Class'
       
    39 	poolDictionaries:''
    36 	poolDictionaries:''
    40 	category:'Languages-Java-Support'
    37 	category:'Languages-Java-Support'
    41 !
    38 !
    42 
    39 
    43 !JavaVMData class methodsFor:'documentation'!
    40 !JavaVMData class methodsFor:'documentation'!
    69 documentation
    66 documentation
    70 "
    67 "
    71     A shared pool containing some VM data accessed by different
    68     A shared pool containing some VM data accessed by different
    72     parties.
    69     parties.
    73 
    70 
    74     Among other things, it keeps references to various classes
       
    75     such as java.lang.String or java.lang.Class (for instance 
       
    76     var java_lang_String) and indices of fields in those classes 
       
    77     (for instance java_lang_String_offsetID). When adding new,
       
    78     please follow the naming convention. 
       
    79 
       
    80     See #vmClasses how the values are initialize.d
       
    81 
       
    82     Historical note: all values here used to be in JavaVM.
    71     Historical note: all values here used to be in JavaVM.
    83 
    72 
    84     [author:]
    73     [author:]
    85         Jan Vrany <jan.vrany@fit.cvut.cz>
    74         Jan Vrany <jan.vrany@fit.cvut.cz>
    86 
    75 
    87     [instance variables:]
    76     [instance variables:]
    88 
    77 
    89     [class variables:]
    78     [class variables:]
    90 
    79 
    91     [see also:]
    80     [see also:]
    92         #vmClasses
       
    93 
    81 
    94 "
    82 "
    95 ! !
       
    96 
       
    97 !JavaVMData class methodsFor:'accessing'!
       
    98 
       
    99 vmClasses
       
   100     "Returns a list of class names that VM must know of, like
       
   101      java.lang.String or java.lang.Class. The list contains
       
   102      internal (slashed) names.
       
   103 
       
   104      Here, instead of listing them manually, a reflection is used to
       
   105      collect them. So to add a class, you only have to add it to a class 
       
   106      instance variables. However, you have to follow naming convetion - the
       
   107      name of the variable must be the full java name (/ replaced by _)."
       
   108 
       
   109 
       
   110     ^self classVarNames 
       
   111         select:[:each|(each startsWith: 'java_') or:[(each startsWith: 'java_')]]
       
   112         thenCollect:[:each|each copyReplaceAll:$_ with:$/].
       
   113 
       
   114     "
       
   115         JavaVMData vmClasses
       
   116     "
       
   117 
       
   118     "Created: / 07-02-2013 / 17:33:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   119 ! !
    83 ! !
   120 
    84 
   121 !JavaVMData class methodsFor:'documentation'!
    85 !JavaVMData class methodsFor:'documentation'!
   122 
    86 
   123 version_HG
    87 version_HG