MCPcopy Index your code
hub / github.com/beanshell/beanshell / getClassSource

Method getClassSource

src/bsh/classpath/BshClassPath.java:161–177  ·  view source on GitHub ↗

Return the source of the specified class which may lie in component path.

( String className )

Source from the content-addressed store, hash-verified

159 path.
160 */
161 synchronized public ClassSource getClassSource( String className )
162 {
163 // Before triggering classpath mapping (initialization) check for
164 // explicitly set class sources (e.g. generated classes). These would
165 // take priority over any found in the classpath anyway.
166 ClassSource cs = (ClassSource)classSource.get( className );
167 if ( cs != null )
168 return cs;
169
170 insureInitialized(); // trigger possible mapping
171
172 cs = (ClassSource)classSource.get( className );
173 if ( cs == null && compPaths != null )
174 for (int i=0; i<compPaths.size() && cs==null; i++)
175 cs = ((BshClassPath)compPaths.get(i)).getClassSource(className);
176 return cs;
177 }
178
179 /**
180 Explicitly set a class source. This is used for generated classes, but

Callers 2

reloadClassesMethod · 0.80
valueChangedMethod · 0.80

Calls 3

insureInitializedMethod · 0.95
getMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected