public ClassContext getClassContext ( JavaClass javaClass ) { // This is a bit silly since we're doing an unnecessary // ClassDescriptor->JavaClass lookup. // However, we can be assured that it will succeed. ClassDescriptor classDescriptor = DescriptorFactory . instance ( ) . getClassDescriptor ( ClassName . toSlashedClassName ( javaClass . getClassName ( ) ) ) ; try { return Global . getAnalysisCache ( ) . getClassAnalysis ( ClassContext . class , classDescriptor ) ; } catch ( CheckedAnalysisException e ) { IllegalStateException ise = new IllegalStateException ( "Could not get ClassContext for JavaClass" ) ; ise . initCause ( e ) ; throw ise ; } }
Get the ClassContext for a class .