当前位置: 首页>>代码示例>>Java>>正文


Java Digester.addSetNext方法代码示例

本文整理汇总了Java中org.apache.commons.digester3.Digester.addSetNext方法的典型用法代码示例。如果您正苦于以下问题:Java Digester.addSetNext方法的具体用法?Java Digester.addSetNext怎么用?Java Digester.addSetNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.digester3.Digester的用法示例。


在下文中一共展示了Digester.addSetNext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: describe4Digester

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
public static Digester describe4Digester(Digester digester, String base) throws Exception{
		String mybase = base;
        digester.addBeanPropertySetter( mybase+"/baseclass", "baseclass" );
        digester.addBeanPropertySetter( mybase+"/kind", "kind" );
        digester.addBeanPropertySetter( mybase+"/tag", "tag" );
        digester.addBeanPropertySetter( mybase+"/name", "name" );
        digester.addBeanPropertySetter( mybase+"/description", "description" );
        digester.addBeanPropertySetter( mybase+"/help", "help" );
		String tmp = mybase + "/entries/entry";
        digester.addObjectCreate( tmp , Entry.class );
        Entry.describe4Digester(digester, tmp);
        digester.addSetNext( tmp, "addEntry" );
        // Properties
		tmp = mybase + "/properties/property";
        digester.addObjectCreate( tmp , PropertyEntry.class );
        PropertyEntry.describe4Digester(digester, tmp);
        digester.addSetNext( tmp, "addProperty" );
        
        return digester;
}
 
开发者ID:PRTG,项目名称:JMXMiniProbe,代码行数:21,代码来源:Profile.java

示例2: describe4Digester

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
public static Digester describe4Digester(Digester digester, String base) throws Exception{
	String mybase = base;
       digester.addBeanPropertySetter( mybase+"/object", "object" );
       digester.addBeanPropertySetter( mybase+"/description", "description" );
       digester.addBeanPropertySetter( mybase+"/shortdescription", "shortDescription" );
       digester.addBeanPropertySetter( mybase+"/displayvalue", "displayValue" );
       digester.addBeanPropertySetter( mybase+"/comment", "comment" );
	String tmp = mybase + "/attributes/attribute";
	digester.addObjectCreate( tmp, StringAttribute.class );
       Attribute.describe4Digester(digester, tmp);
       digester.addSetNext( tmp, "addAttribute" );
       // Properties
	tmp = mybase + "/properties/property";
       digester.addObjectCreate( tmp , PropertyEntry.class );
       PropertyEntry.describe4Digester(digester, tmp);
       digester.addSetNext( tmp, "addProperty" );

       return digester;
}
 
开发者ID:PRTG,项目名称:JMXMiniProbe,代码行数:20,代码来源:Entry.java

示例3: setupSingleEntryParser

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
private static void setupSingleEntryParser(Digester digester){
	digester.addObjectCreate("*/entry", NotificationHubDescription.class);
	digester.addCallMethod("*/entry/title","setPath",1);
	digester.addCallParam("*/entry/title",0);
	digester.addObjectCreate("*/ApnsCredential", ApnsCredential.class);
	digester.addObjectCreate("*/AdmCredential", AdmCredential.class);
	digester.addObjectCreate("*/WnsCredential", WindowsCredential.class);
	digester.addObjectCreate("*/MpnsCredential", MpnsCredential.class);
	digester.addObjectCreate("*/GcmCredential", GcmCredential.class);
	digester.addObjectCreate("*/BaiduCredential", BaiduCredential.class);
	PnsCredential.setupDigister(digester);
	digester.addSetNext("*/ApnsCredential", "setApnsCredential", ApnsCredential.class.getName());
	digester.addSetNext("*/AdmCredential", "setAdmCredential", AdmCredential.class.getName());
	digester.addSetNext("*/WnsCredential", "setWindowsCredential", WindowsCredential.class.getName());
	digester.addSetNext("*/MpnsCredential", "setMpnsCredential", MpnsCredential.class.getName());
	digester.addSetNext("*/GcmCredential", "setGcmCredential", GcmCredential.class.getName());
	digester.addSetNext("*/BaiduCredential", "setBaiduCredential", BaiduCredential.class.getName());
}
 
开发者ID:Azure,项目名称:azure-notificationhubs-java-backend,代码行数:19,代码来源:NotificationHubDescription.java

示例4: addCollectionRules

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
private static void addCollectionRules(Digester digester) {
	digester.addObjectCreate("feed", CollectionResult.class);
	digester.addSetNext("*/RegistrationDescription", "addRegistration");
	digester.addSetNext("*/WindowsRegistrationDescription", "addRegistration");
	digester.addSetNext("*/WindowsTemplateRegistrationDescription", "addRegistration");
	digester.addSetNext("*/AppleRegistrationDescription", "addRegistration");
	digester.addSetNext("*/AppleTemplateRegistrationDescription", "addRegistration");
	digester.addSetNext("*/GcmRegistrationDescription", "addRegistration");
	digester.addSetNext("*/GcmTemplateRegistrationDescription", "addRegistration");
	digester.addSetNext("*/MpnsRegistrationDescription", "addRegistration");
	digester.addSetNext("*/MpnsTemplateRegistrationDescription", "addRegistration");
	digester.addSetNext("*/AdmRegistrationDescription", "addRegistration");
	digester.addSetNext("*/AdmTemplateRegistrationDescription", "addRegistration");
	digester.addSetNext("*/BaiduRegistrationDescription", "addRegistration");
	digester.addSetNext("*/BaiduTemplateRegistrationDescription", "addRegistration");
}
 
开发者ID:Azure,项目名称:azure-notificationhubs-java-backend,代码行数:17,代码来源:Registration.java

示例5: setupSingleEntryParser

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
private static void setupSingleEntryParser(Digester digester){
	digester.addObjectCreate("*/entry", NotificationHubJob.class);
	digester.addCallMethod("*/JobId", "setJobId",1);
	digester.addCallParam("*/JobId", 0);
	digester.addCallMethod("*/Progress", "setProgressFromString",1);
	digester.addCallParam("*/Progress", 0);
	digester.addCallMethod("*/Type", "setJobTypeFromString",1);
	digester.addCallParam("*/Type", 0);
	digester.addCallMethod("*/Status", "setJobStatusFromString",1);
	digester.addCallParam("*/Status", 0);
	digester.addCallMethod("*/OutputContainerUri", "setOutputContainerUri",1);
	digester.addCallParam("*/OutputContainerUri", 0);
	digester.addCallMethod("*/ImportFileUri", "setImportFileUri",1);
	digester.addCallParam("*/ImportFileUri", 0);
	digester.addCallMethod("*/Failure", "setFailure",1);
	digester.addCallParam("*/Failure", 0);
	digester.addCallMethod("*/CreatedAt", "setCreatedAtFromString",1);
	digester.addCallParam("*/CreatedAt", 0);
	digester.addCallMethod("*/UpdatedAt", "setUpdatedAtFromString",1);
	digester.addCallParam("*/UpdatedAt", 0);		
	digester.addObjectCreate("*/OutputProperties", HashMap.class);
	digester.addCallMethod("*/d3p1:KeyValueOfstringstring", "put",2);
	digester.addCallParam("*/d3p1:Key", 0);
	digester.addCallParam("*/d3p1:Value", 1);
	digester.addSetNext("*/OutputProperties", "setOutputProperties", Map.class.getName());
}
 
开发者ID:Azure,项目名称:azure-notificationhubs-java-backend,代码行数:27,代码来源:NotificationHubJob.java

示例6: addRuleInstances

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
/**
 * @see
 * org.apache.commons.digester.RuleSetBase#addRuleInstances(org.apache.commons.digester.Digester)
 */
@Override
public void addRuleInstances(Digester digester) {
    digester.addObjectCreate("profiles", Profiles.class);
    digester.addObjectCreate("profiles/profile", Profile.class);
    digester.addObjectCreate("profiles/profile/setting", Setting.class);

    digester.addSetNext("profiles/profile", "addProfile");
    digester.addSetNext("profiles/profile/setting", "addSetting");

    digester.addSetProperties("profiles/profile", "kind", "kind");
    digester.addSetProperties("profiles/profile", "name", "name");
    digester.addSetProperties("profiles/profile", "version", "version");
    digester.addSetProperties("profiles/profile/setting", "id", "id");
    digester.addSetProperties("profiles/profile/setting", "value", "value");
}
 
开发者ID:markiewb,项目名称:eclipsecodeformatter_for_netbeans,代码行数:20,代码来源:RuleSet.java

示例7: describe4Digester

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
public static Digester describe4Digester(Digester digester, String base) throws Exception{
        digester.addBeanPropertySetter( base+"/object", "object" );
        digester.addBeanPropertySetter( base+"/displayvalue", "displayValue" );
        digester.addBeanPropertySetter( base+"/description", "description" );
        digester.addBeanPropertySetter( base+"/comment", "comment" );
        digester.addBeanPropertySetter( base+"/shortdescription", "shortDescription" );
        digester.addBeanPropertySetter( base+"/enabled", "enabled" );
        digester.addBeanPropertySetter( base+"/unit", "unit" );
        digester.addBeanPropertySetter( base+"/mode", "mode" );
        digester.addBeanPropertySetter( base+"/customunit", "customUnit" );
        
//        digester.addCallMethod(base+"/unit", "setUnit", 1,  new String[]{"java.lang.String"});
        digester.addBeanPropertySetter( base+"/mpy", "mpy" );
        digester.addBeanPropertySetter( base+"/div", "div" );
        
        digester.addBeanPropertySetter( base+"/limitmaxerror", "limitMaxError" );	
        digester.addBeanPropertySetter( base+"/limitmaxwarning", "limitMaxWarning" );
        digester.addBeanPropertySetter( base+"/limitminwarning", "limitMinWarning" );
        digester.addBeanPropertySetter( base+"/limitminerror", "limitMinError" );
        digester.addBeanPropertySetter( base+"/limiterrormsg", "limitErrorMsg" );
        digester.addBeanPropertySetter( base+"/limitwarningmsg", "limitWarningMsg" );
        digester.addBeanPropertySetter( base+"/limitmode", "limitMode" );
//        digester.addBeanPropertySetter( base+"/limitmode", "limitMode" );
        // Properties
		String tmp = base + "/properties/property";
        digester.addObjectCreate( tmp , PropertyEntry.class );
        PropertyEntry.describe4Digester(digester, tmp);
        digester.addSetNext( tmp, "addProperty" );
        
        return digester; 
	}
 
开发者ID:PRTG,项目名称:JMXMiniProbe,代码行数:32,代码来源:Attribute.java

示例8: describe4Digester

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
public static Digester describe4Digester(Digester digester, String base) throws Exception{
	String mybase = base +"profiles";
       digester.addObjectCreate( mybase , Profiles.class );
	mybase += "/profile";
       digester.addObjectCreate( mybase , Profile.class );
       Profile.describe4Digester(digester, mybase);
       digester.addSetNext( mybase, "addProfile" );
	return digester;
}
 
开发者ID:PRTG,项目名称:JMXMiniProbe,代码行数:10,代码来源:Profiles.java

示例9: addCollectionRules

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
private static void addCollectionRules(Digester digester) {
	digester.addObjectCreate("feed", CollectionResult.class);
	digester.addSetNext("*/RegistrationDescription", "addRegistration");
	digester.addSetNext("*/WindowsRegistrationDescription", "addRegistration");
	digester.addSetNext("*/WindowsTemplateRegistrationDescription", "addRegistration");
	digester.addSetNext("*/AppleRegistrationDescription", "addRegistration");
	digester.addSetNext("*/AppleTemplateRegistrationDescription", "addRegistration");
	digester.addSetNext("*/GcmRegistrationDescription", "addRegistration");
	digester.addSetNext("*/GcmTemplateRegistrationDescription", "addRegistration");
	digester.addSetNext("*/MpnsRegistrationDescription", "addRegistration");
	digester.addSetNext("*/MpnsTemplateRegistrationDescription", "addRegistration");
	digester.addSetNext("*/AdmRegistrationDescription", "addRegistration");
	digester.addSetNext("*/AdmTemplateRegistrationDescription", "addRegistration");
}
 
开发者ID:fsautomata,项目名称:notificationhubs-rest-java,代码行数:15,代码来源:Registration.java

示例10: getSimpleCommands

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
public static SimpleCommandSet getSimpleCommands() {
	SimpleCommandSet sms = null;
	try {
        Digester digester = new Digester();
	    digester.setValidating(false);
		//digester.setNamespaceAware(true);
		//String xsd = "" + new File("quickserver_config.xsd").toURI();
		//digester.setSchema(xsd);

		//nested QSAdminServer tag
		String mainTag = "simple-command-set";
		String subTag = "simple-command";
		digester.addObjectCreate(mainTag, SimpleCommandSet.class);
		digester.addObjectCreate(mainTag+"/"+subTag, SimpleCommand.class);
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/name");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/command");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/desc");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/target-needed", "targetNeeded");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/multi-line-response", "multiLineResponse");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/version");
		digester.addSetNext(mainTag+"/"+subTag,"addCommand");
		URL configFile = 
			SimpleCommandSet.class.getResource("/org/quickserver/net/qsadmin/gui/conf/MainCommandPanel.xml");
		if(configFile==null)
			throw new RuntimeException("XML File not found : "+"MainCommandPanel.xml");

		InputStream input = configFile.openStream();
		logger.fine("Loading command config from xml file : " + input);
		sms = (SimpleCommandSet) digester.parse(input);			
	} catch(Exception e) {
		logger.severe("Could not init from xml file : " +e);
		logger.fine("StackTrace:\n"+MyString.getStackTrace(e));
	}
	return sms;
}
 
开发者ID:QuickServerLab,项目名称:QuickServer-Main,代码行数:36,代码来源:SimpleCommandSet.java

示例11: getPropertieSet

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
public static PropertieSet getPropertieSet() {
	PropertieSet ps = null;
	try {
        Digester digester = new Digester();
	    digester.setValidating(false);
		//digester.setNamespaceAware(true);
		//String xsd = "" + new File("quickserver_config.xsd").toURI();
		//digester.setSchema(xsd);

		//nested QSAdminServer tag
		String mainTag = "propertie-set";
		String subTag = "propertie";
		digester.addObjectCreate(mainTag, PropertieSet.class);
		digester.addObjectCreate(mainTag+"/"+subTag, Propertie.class);
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/name");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/command");
		digester.addCallMethod(mainTag+"/"+subTag+"/get", "setGet",0);
		digester.addCallMethod(mainTag+"/"+subTag+"/set", "setSet",0);
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/type");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/desc");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/select");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/target-needed", "targetNeeded");
		digester.addBeanPropertySetter(mainTag+"/"+subTag+"/version");
		digester.addSetNext(mainTag+"/"+subTag,"addCommand");

		URL configFile = 
			PropertieSet.class.getResource("/org/quickserver/net/qsadmin/gui/conf/PropertieSet.xml");
		if(configFile==null)
			throw new RuntimeException("XML File not found : "+"PropertieSet.xml");

		InputStream input = configFile.openStream();			
		logger.fine("Loading command config from xml file : " + input);
		ps = (PropertieSet) digester.parse(input);			
	} catch(Exception e) {
		logger.severe("Could not init from xml file : " +e);
		logger.fine("StackTrace:\n"+MyString.getStackTrace(e));
	}
	return ps;
}
 
开发者ID:QuickServerLab,项目名称:QuickServer-Main,代码行数:40,代码来源:PropertieSet.java

示例12: build

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
/**
 * Builds a Vocabulary from the supplied input stream
 *
 * @param is For the XML
 * @return The extension
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 */
public Vocabulary build(InputStream is) throws IOException, SAXException, ParserConfigurationException {
  Digester digester = new Digester(saxf.newSAXParser());
  digester.setNamespaceAware(true);
  digester.setXIncludeAware(false);
  digester.setRuleNamespaceURI(VOCABULARY_NAMESPACE);

  Vocabulary tv = new Vocabulary();
  digester.push(tv);

  // build the thesaurus
  digester.addCallMethod("*/thesaurus", "setTitle", 1);
  digester.addRule("*/thesaurus", new CallParamNoNSRule(0, "title"));

  digester.addCallMethod("*/thesaurus", "setDescription", 1);
  digester.addRule("*/thesaurus", new CallParamNoNSRule(0, "description"));

  digester.addCallMethod("*/thesaurus", "setLink", 1);
  digester.addRule("*/thesaurus", new CallParamNoNSRule(0, "relation"));

  digester.addCallMethod("*/thesaurus", "setUri", 1);
  digester.addRule("*/thesaurus", new CallParamNoNSRule(0, "URI"));

  // build the concept
  digester.addObjectCreate("*/concept", VocabularyConcept.class);

  digester.addCallMethod("*/concept", "setLink", 1);
  digester.addRule("*/concept", new CallParamNoNSRule(0, "relation"));

  digester.addCallMethod("*/concept", "setDescription", 1);
  digester.addRule("*/concept", new CallParamNoNSRule(0, "description"));

  digester.addCallMethod("*/concept", "setUri", 1);
  digester.addRule("*/concept", new CallParamNoNSRule(0, "URI"));

  digester.addCallMethod("*/concept", "setIdentifier", 1);
  digester.addRule("*/concept", new CallParamNoNSRule(0, "identifier"));

  // build the terms
  digester.addObjectCreate("*/preferred/term", VocabularyTerm.class);
  VocabularyTerm t = new VocabularyTerm();

  digester.addCallMethod("*/preferred/term", "setLang", 1);
  digester.addRule("*/preferred/term", new CallParamNoNSRule(0, "lang"));

  digester.addCallMethod("*/preferred/term", "setTitle", 1);
  digester.addRule("*/preferred/term", new CallParamNoNSRule(0, "title"));

  digester.addSetNext("*/preferred/term", "addPreferredTerm");

  // build alternative terms
  digester.addObjectCreate("*/alternative/term", VocabularyTerm.class);
  VocabularyTerm talt = new VocabularyTerm();

  digester.addCallMethod("*/alternative/term", "setLang", 1);
  digester.addRule("*/alternative/term", new CallParamNoNSRule(0, "lang"));

  digester.addCallMethod("*/alternative/term", "setTitle", 1);
  digester.addRule("*/alternative/term", new CallParamNoNSRule(0, "title"));

  digester.addSetNext("*/alternative/term", "addAlternativeTerm");

  // add concept
  digester.addSetNext("*/concept", "addConcept");

  digester.parse(is);
  return tv;
}
 
开发者ID:gbif,项目名称:dwca-io,代码行数:77,代码来源:VocabularyFactory.java

示例13: build

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
/**
 * Builds an extension from the supplied input stream
 *
 * @param is For the XML
 * @return The extension
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 */
public Extension build(InputStream is, URL url, boolean dev) throws IOException, SAXException, ParserConfigurationException {

  // in order to deal with arbitrary namespace prefixes we need to parse namespace aware!
  Digester digester = new Digester(saxf.newSAXParser());
  digester.setRuleNamespaceURI(EXTENSION_NAMESPACE);

  Extension e = new Extension(url, dev);
  digester.push(e);

  digester.addCallMethod("*/extension", "setTitle", 1);
  digester.addRule("*/extension", new CallParamNoNSRule(0, "title"));

  digester.addCallMethod("*/extension", "setName", 1);
  digester.addCallParam("*/extension", 0, "name");

  digester.addCallMethod("*/extension", "setNamespace", 1);
  digester.addCallParam("*/extension", 0, "namespace");

  digester.addCallMethod("*/extension", "setRowType", 1);
  digester.addCallParam("*/extension", 0, "rowType");

  digester.addCallMethod("*/extension", "setLink", 1);
  digester.addRule("*/extension", new CallParamNoNSRule(0, "relation"));

  digester.addCallMethod("*/extension", "setDescription", 1);
  digester.addRule("*/extension", new CallParamNoNSRule(0, "description"));

  digester.addCallMethod("*/extension", "setSubject", 1);
  digester.addRule("*/extension", new CallParamNoNSRule(0, "subject"));

  // build the properties
  digester.addObjectCreate("*/property", ExtensionProperty.class);

  digester.addCallMethod("*/property", "setQualname", 1);
  digester.addCallParam("*/property", 0, "qualName");

  digester.addCallMethod("*/property", "setName", 1);
  digester.addCallParam("*/property", 0, "name");

  digester.addCallMethod("*/property", "setNamespace", 1);
  digester.addCallParam("*/property", 0, "namespace");

  digester.addCallMethod("*/property", "setGroup", 1);
  digester.addCallParam("*/property", 0, "group");

  digester.addCallMethod("*/property", "setType", 1);
  digester.addCallParam("*/property", 0, "type");

  digester.addCallMethod("*/property", "setRequired", 1);
  digester.addCallParam("*/property", 0, "required");

  digester.addCallMethod("*/property", "setLink", 1);
  digester.addRule("*/property", new CallParamNoNSRule(0, "relation"));

  digester.addCallMethod("*/property", "setDescription", 1);
  digester.addRule("*/property", new CallParamNoNSRule(0, "description"));

  digester.addCallMethod("*/property", "setExamples", 1);
  digester.addCallParam("*/property", 0, "examples");

  digester.addCallMethod("*/property", "setColumnLength", 1);
  digester.addCallParam("*/property", 0, "columnLength");

  // This is a special rule that will use the url2ThesaurusMap
  // to set the Vocabulary based on the attribute "thesaurus"
  digester.addRule("*/property", thesaurusRule);

  digester.addSetNext("*/property", "addProperty");

  digester.parse(is);
  return e;
}
 
开发者ID:gbif,项目名称:dwca-io,代码行数:82,代码来源:ExtensionFactory.java

示例14: setupCollectionParser

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
private static void setupCollectionParser(Digester digester){	
	digester.addObjectCreate("*/feed", LinkedList.class);
	setupSingleEntryParser(digester);
	digester.addSetNext("*/entry", "add", NotificationHubDescription.class.getName());
}
 
开发者ID:Azure,项目名称:azure-notificationhubs-java-backend,代码行数:6,代码来源:NotificationHubDescription.java

示例15: setupCollectionParser

import org.apache.commons.digester3.Digester; //导入方法依赖的package包/类
private static void setupCollectionParser(Digester digester){	
	digester.addObjectCreate("*/feed", LinkedList.class);
	setupSingleEntryParser(digester);
	digester.addSetNext("*/entry", "add", NotificationHubJob.class.getName());
}
 
开发者ID:Azure,项目名称:azure-notificationhubs-java-backend,代码行数:6,代码来源:NotificationHubJob.java


注:本文中的org.apache.commons.digester3.Digester.addSetNext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。