snaker-core/src/main/java/org/snaker/engine/core/ServiceContext.java
public static void put(String name, Class<?> clazz) {
		AssertHelper.notNull(context, "未注册服务上下文");
		if(log.isInfoEnabled()) {
			log.info("put new instance[name=" + name + "][clazz=" + clazz.getName() + "]");
		}
		context.put(name, clazz);
	}
public static void put(String name, Class<?> clazz) {
		AssertHelper.notNull(context, "未注册服务上下文");
		if(log.isInfoEnabled()) {
			log.info("put new instance[name=" + name + "][clazz=" + clazz.getName() + "]");
		}
		context.put(name, clazz);
	}
public static void put ( String name , Class < ? > clazz ) { AssertHelper . notNull ( context , "未注册服务上下文"); if ( log . isInfoEnabled ( ) ) { log . info ( "put new instance[name=" + name + "][clazz=" + clazz . getName ( ) + "]" ) ; } context . put ( name , clazz ) ; }
向上下文添加服务实例
@param name 服务名称
@param clazz 服务类型
向上下文添加服务实例