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 = "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 IUberspect))
{
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 = (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);
}
}