/// <summary> /// Gets the classname for the Uberspect introspection package and /// instantiates an instance. /// </summary> private void initializeIntrospection() { String rm = GetString(RuntimeConstants.UBERSPECT_CLASSNAME); if (rm != null && rm.Length > 0) { Object o; try { o = SupportClass.CreateNewInstance(Type.GetType(rm)); } catch (System.Exception) { String err = string.Format( "The specified class for Uberspect ({0}) does not exist (or is not accessible to the current classlaoder.", rm); Error(err); throw new System.Exception(err); } if (!(o is IUberspect)) { String err = string.Format( "The specified class for Uberspect ({0}) does not implement org.apache.velocity.util.introspector.Uberspect. Velocity not initialized correctly.", rm); Error(err); throw new System.Exception(err); } uberSpect = (IUberspect)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); } }
/// <summary> /// Gets the classname for the Uberspect introspection package and /// instantiates an instance. /// </summary> private void initializeIntrospection() { String rm = GetString(RuntimeConstants.UBERSPECT_CLASSNAME); if (rm != null && rm.Length > 0) { Object o; try { o = SupportClass.CreateNewInstance(Type.GetType(rm)); } catch(System.Exception) { String err = string.Format( "The specified class for Uberspect ({0}) does not exist (or is not accessible to the current classlaoder.", rm); Error(err); throw new System.Exception(err); } if (!(o is IUberspect)) { String err = string.Format( "The specified class for Uberspect ({0}) does not implement org.apache.velocity.util.introspector.Uberspect. Velocity not initialized correctly.", rm); Error(err); throw new System.Exception(err); } uberSpect = (IUberspect) 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); } }
/// <summary> {@inheritDoc} /// <p> /// Init both wrapped uberspectors /// </p> /// /// </summary> /// <seealso cref="org.apache.velocity.util.introspection.Uberspect.Init()"> /// </seealso> //@Override public override void Init() { leftUberspect.Init(); rightUberspect.Init(); }