NVelocity/Util/Introspection/UberspectImpl.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace NVelocity.Util.Introspection
{
	using System;
	using System.Collections;
	using System.Reflection;
	using System.Text;
	using NVelocity.Runtime.Parser.Node;
	using Runtime;

	/// <summary>  Implementation of Uberspect to provide the default introspective
	/// functionality of Velocity
	/// *
	/// </summary>
	/// <author>  <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
	/// </author>
	/// <version>  $Id: UberspectImpl.cs,v 1.1 2004/12/27 05:55:08 corts Exp $
	/// 
	/// </version>
	public class UberspectImpl : IUberspect, UberspectLoggable
	{
		/// <summary>
		/// Our runtime logger.
		/// </summary>
		private IRuntimeLogger rlog;

		/// <summary>
		/// the default Velocity introspector
		/// </summary>
		private static Introspector introspector;

		/// <summary>
		/// Sets the runtime logger - this must be called before anything
		/// else besides init() as to get the logger.  Makes the pull
		/// model appealing...
		/// </summary>
		public IRuntimeLogger RuntimeLogger
		{
			set
			{
				rlog = value;
				introspector = new Introspector(rlog);
			}
		}

		/// <summary>
		/// init - does nothing - we need to have setRuntimeLogger
		/// called before getting our introspector, as the default
		/// vel introspector depends upon it.
		/// </summary>
		public void Init()
		{
		}

		/// <summary>
		/// Method
		/// </summary>
		public IVelMethod GetMethod(Object obj, String methodName, Object[] args, Info i)
		{
			if (obj == null)
				return null;
后面还有 220 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。