/// <summary> Gets the classname for the Uberspect introspection package and /// instantiates an instance. /// </summary> private void initializeIntrospection() { String rm = getString(RuntimeConstants_Fields.UBERSPECT_CLASSNAME); if (rm != null && rm.Length > 0) { Object o = null; //UPGRADE_NOTE: Exception 'java.lang.ClassNotFoundException' was converted to 'System.Exception' which has different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1100"' try { //UPGRADE_TODO: Format of parameters of method 'java.lang.Class.forName' are different in the equivalent in .NET. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1092"' o = SupportClass.CreateNewInstance(Type.GetType(rm)); } catch (System.Exception) { String err = "The specified class for Uberspect (" + rm + ") does not exist (or is not accessible to the current classlaoder."; error(err); throw new System.Exception(err); } if (!(o is Uberspect)) { String err = "The specified class for Uberspect (" + rm + ") does not implement org.apache.velocity.util.introspector.Uberspect." + " Velocity not initialized correctly."; error(err); throw new System.Exception(err); } uberSpect = (Uberspect)o; if (uberSpect is UberspectLoggable) { ((UberspectLoggable)uberSpect).RuntimeLogger = this; } uberSpect.init(); } else { /* * someone screwed up. Lets not fool around... */ String err = "It appears that no class was specified as the" + " Uberspect. Please ensure that all configuration" + " information is correct."; error(err); throw new System.Exception(err); } }